Long running actions - Retry-After header explained
This API provide some actions that should be used in different way. When we have to deal with long running tasks we don't want to make client wait. To resolve this case we provided support for Retry-After
header. How it works? Pretty simple:
Client executes long running action (ex. POST /long-running)
If response data is available then response with HTTP status 200 and data array is returned
If request is not yet available API returns following response:
And here we have to explain the meaning of above response headers:
HTTP/1.1 202 ACCEPTED
indicates that response is not yet availableRetry-After
indicates how long client should wait before making next request to this endpointExpires
contains the date/time after which the response is considered stale (client should NOT make another request to this endpoint after time specified at this header)
That all. Pretty simple. Isn't it?