HTTP Status Codes
The WhenFresh API returns the HTTP status codes as follows.
HTTP Status 2xx (Success)
HTTP status codes in the 200s mean that the request completed successfully, whether or not it actually returned any content.
- 200 (OK): The standard response for successful HTTP requests, with the response containing the requested resource.
- 204 (No Content): The server successfully processed the request and is not returning any content, for example when hitting the
api.whenfresh.com/dev/null
healthcheck resource.
HTTP Status 4xx (Client Error)
HTTP status codes in the 400s mean that the request did not complete successfully because of a problem with the request itself.
HTTP Status 5xx (Serve Error)
HTTP status codes in the 500s mean that the request did not complete successfuly due to a server-side problem.
- 503 (Service Unavailable): The server is temporarily unavailable, and can be re-tried.
- 504 (Gateway Timeout): The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.