API Reference - Response object
In the non-RESTful variant of the API, all API responses return a
response object that specifies what the RESTful status code
and response headers would have been.
Fields
status [int]: the HTTP status code of the response.
statusText [int]: the human-readable name of the HTTP status code, e.g. "Bad Request" for 400 and "Not Found" for 404.
redirectLocation [string, optional]: the URL to use
for future requests to this resource, if the status was 3xx.
Otherwise, this field isn't present. Normally, this would be the
Location response header.
retryAfter [int, optional]: the number of seconds to
wait before retrying this request, for some 4xx or 5xx statuses.
Otherwise, this field isn't present. Normally, this would be the
Retry-After response header.
content [Content, optional]: the requested content's info, if the request was successful. Otherwise, this field isn't present. Normally, this would be the response body.
error [string, optional]: a human-readable error message, if the status was 4xx or 5xx. Otherwise, this field isn't present. Normally, this would be the response body.
Note that all response instances will have either a
content field or an error field.
