Often times I see the following for polling:
- Send a request and get a unique ID back.
- Poll a "Status" endpoint, which tells the client when the request has been completed.
- Send a request to fetch the response.
Can't steps (2) and (3) be combined? If the response isn't ready, it'll return no response back, and some status indicating that. If it is ready, it'll return the response.
Why is (2) and (3) often separate steps?
Thanks!
Aucun commentaire:
Enregistrer un commentaire