mercredi 2 septembre 2020

POST form data and wait the response or any other possible solution?

I made the research but couldn't found the answer I am looking for, most likely due to my failure to address the question properly. I hope I can do better here.

So, I have a web form and I am sending this form's fields as JSON to the backend server via a POST request. The server should send back a JSON response to the client after a computation according to those fields. This computation could take up to 5 minutes or so on.

My question is, does the server should send back the computed JSON as the response to this POST request? Or, is there any way to do something like set the job with a POST request, then GET the result somehow? Or, is there any other ways, like, what is the best practice?

If the description is too vague, I can give more implementation detail.

Aucun commentaire:

Enregistrer un commentaire