mardi 25 mai 2021

PHP - third party rest call, wait for response, prevent reload

I've got a logic problem. Application is in php, written by me. There's a form where the user enters some data and press a button to submit. I know the Post/Redirect/Get pattern to prevent the site reload. In my case when the user press the button im talking with a third party rest api and need to wait for an response to store it in a database. So I cant close the current form till I've got my reponse. The response taking 5-10seconds.

Is there a way to handle this scenario?

Aucun commentaire:

Enregistrer un commentaire