Adds 204 status code as an option (#127)

* Adds 204 status code as an option

* Fix typo
This commit is contained in:
Vinicius Kiatkoski Neves 2018-02-06 11:59:09 -02:00 committed by Vahid Panjganj
parent 3ad76fe950
commit 2b4adfdab9

View File

@ -643,7 +643,7 @@ _Why:_
_Note: Keep security exception messages as generic as possible. For instance, Instead of saying incorrect password, you can reply back saying invalid username or password so that we dont unknowingly inform user that username was indeed correct and only the password was incorrect._
* Use only these 8 status codes to send with you response to describe whether **everything worked**,
* Use these status codes to send with your response to describe whether **everything worked**,
The **client app did something wrong** or The **API did something wrong**.
_Which ones:_
@ -651,6 +651,8 @@ The **client app did something wrong** or The **API did something wrong**.
> `201 Created` for when a new instance is created. Creating a new instance, using `POST` method returns `201` status code.
> `204 No Content` response represents success but there is no content to be sent in the response. Use it when `DELETE` operation succeeds.
> `304 Not Modified` response is to minimize information transfer when the recipient already has cached representations.
> `400 Bad Request` for when the request was not processed, as the server could not understand what the client is asking for.