-
Notifications
You must be signed in to change notification settings - Fork 2
Asynchronous requests
AeroStun edited this page Jan 22, 2020
·
4 revisions
Async requests instruct the server to execute the task in the background and buffer the response once it is ready, until the client requests it.
They allow the client to make requests that would otherwise timeout the HTTP connection.
Over HTTP, making a request async is simply adding ?async=true
at the end of the query.
On success, the server will reply with an identifier, which can then be used to retrieve the response, by means of GET /async/$identifier
HTTP 404 will be sent back if there is no task with the provided identifier.
HTTP 102 will be sent back if the task is still in progress.
HTTP 302 will be sent back with the response body otherwise.