HTTP Status Codes and REST

Because REST requests are made over HTTP, the client receives HTTP status codes in a response. Some of the common HTTP return codes and their corresponding meaning in the context of RAD are as follows:

  • 200 OK – Request succeeded.

  • 201 Created – Request succeeded and a new resource is created.

  • 204 No Content – Request succeeded but the server did not return a message body.

  • 400 Bad Request – Request did not succeed, possibly because of a data-type mismatch or a illegal access.

  • 401 Unauthorized – Insufficient privileges.

  • 404 Not found – Specified resource was not found.