Enhance HTTP Success section (9.5.2) (#36)

* Update HTTP Success section

Update HTTP Success section and fix grammatical issue.



Merge remote-tracking branch 'origin/Mohamed3on-patch-3' into Mohamed3on-patch-3


Merge remote-tracking branch 'origin/Mohamed3on-patch-3' into Mohamed3on-patch-3

* Fix typo
This commit is contained in:
Mohamed Oun 2017-07-08 23:48:02 +03:00 committed by Vahid Panjganj
parent e749c0302f
commit 3185ad8143

View File

@ -270,9 +270,9 @@ Note: Keep security exception messages as generic as possible. For instance, Ins
#### 9.5.2 Align your feedback with HTTP codes.
##### The client and API worked (success 2xx response code)
* `200` HTTP response representing success for GET, PUT or POST.
* `201` Created This status code should be returned whenever the new instance is created. E.g on creating a new instance, using POST method, should always return `201` status code.
* `204` No Content represents the request is successfully processed, but has not returned any content. DELETE can be a good example of this. If there is any error, then the response code would be not be of 2xx Success Category but around 4xx Client Error category.
* `200 OK` This HTTP response represents success for `GET`, `PUT` or `POST` requests.
* `201 Created` This status code should be returned whenever a new instance is created. E.g on creating a new instance, using `POST` method, should always return `201` status code.
* `204 No Content` represents the request was successfully processed, but has not returned any content. `DELETE` can be a good example of this. If there is any error, then the response code would be not be of 2xx Success Category but around 4xx Client Error category.
##### The client application behaved incorrectly (client error 4xx response code)
* `400` Bad Request indicates that the request by the client was not processed, as the server could not understand what the client is asking for.