Skip to content

Fixes some markdown issues #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ Having a good guideline for creating commits and sticking to it makes working wi
- Produce readable production logging. Ideally use logging libraries to be used in production mode (such as [winston](https://github.com/winstonjs/winston) or
[node-bunyan](https://github.com/trentm/node-bunyan)).

_Why:_
> It makes your troubleshooting less unpleasant with colorization, timestamps, log to a file in addition to the console or even logging to a file that rotates daily. [read more...](https://blog.risingstack.com/node-js-logging-tutorial/)
_Why:_
> It makes your troubleshooting less unpleasant with colorization, timestamps, log to a file in addition to the console or even logging to a file that rotates daily. [read more...](https://blog.risingstack.com/node-js-logging-tutorial/)

<a name="api"></a>

Expand Down Expand Up @@ -742,27 +742,27 @@ _Why:_
- 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:_
> `200 OK` response represents success for `GET`, `PUT` or `POST` requests.
_Which ones:_
> `200 OK` response represents success for `GET`, `PUT` or `POST` requests.

> `201 Created` for when a new instance is created. Creating a new instance, using `POST` method returns `201` status code.
> `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.
> `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.
> `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.
> `400 Bad Request` for when the request was not processed, as the server could not understand what the client is asking for.

> `401 Unauthorized` for when the request lacks valid credentials and it should re-request with the required credentials.
> `401 Unauthorized` for when the request lacks valid credentials and it should re-request with the required credentials.

> `403 Forbidden` means the server understood the request but refuses to authorize it.
> `403 Forbidden` means the server understood the request but refuses to authorize it.

> `404 Not Found` indicates that the requested resource was not found.
> `404 Not Found` indicates that the requested resource was not found.

> `500 Internal Server Error` indicates that the request is valid, but the server could not fulfill it due to some unexpected condition.
> `500 Internal Server Error` indicates that the request is valid, but the server could not fulfill it due to some unexpected condition.

_Why:_
> Most API providers use a small subset HTTP status codes. For example, the Google GData API uses only 10 status codes, Netflix uses 9, and Digg, only 8. Of course, these responses contain a body with additional information. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to wikipedia to figure out what you're trying to tell them. [read more...](https://apigee.com/about/blog/technology/restful-api-design-what-about-errors)
_Why:_
> Most API providers use a small subset HTTP status codes. For example, the Google GData API uses only 10 status codes, Netflix uses 9, and Digg, only 8. Of course, these responses contain a body with additional information. There are over 70 HTTP status codes. However, most developers don't have all 70 memorized. So if you choose status codes that are not very common you will force application developers away from building their apps and over to wikipedia to figure out what you're trying to tell them. [read more...](https://apigee.com/about/blog/technology/restful-api-design-what-about-errors)

- Provide total numbers of resources in your response.
- Accept `limit` and `offset` parameters.
Expand Down