Creates rest/core-principles/quality.md

Auto commit by GitBook Editor
This commit is contained in:
apidesigner
2018-06-23 12:56:08 +00:00
parent 6ae3093b22
commit 958d90ea5d
87 changed files with 1276 additions and 1276 deletions

34
rest/protocol/http.md Normal file
View File

@@ -0,0 +1,34 @@
# HTTP
Every API MUST support [HTTP/1.1](https://tools.ietf.org/html/rfc7230) and **MUST** adhere to its **semantic**.
## HTTP Protocol Quick Start
The understanding of HTTP starts with the understanding of [HTTP message](https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages) and its routing.
Once you are familiar with the **HTTP message structure** learn about the **HTTP request methods**, **HTTP response status codes** and **HTTP headers**.
Each HTTP request method, status code, and header have its semantics defined, and every API **MUST** strictly adhere to it.
Follow the [Robustness Principle](core-principles/robustness.md). Use only the HTTP request methods, response codes and HTTP headers you understand, be liberal in accepting others.
## Know HTTP
The following documents are great overview of the HTTP protocol and related standards:
- [HTTP Headers](https://github.com/for-GET/know-your-http-well/blob/master/headers.md)
- [HTTP Request Methods](https://github.com/for-GET/know-your-http-well/blob/master/methods.md)
- [HTTP Response Status Codes](https://github.com/for-GET/know-your-http-well/blob/master/status-codes.md)
- [HTTP Link Relations](https://github.com/for-GET/know-your-http-well/blob/master/relations.md)
Alternatively, you can download HTTP cheat sheets at [HTTP posters](https://github.com/bigcompany/know-your-http).
## RFCs
The HTTP protocol semantics is defined in the following RFCs:
> 1. [RFC 7230, HTTP/1.1: Message Syntax and Routing](https://tools.ietf.org/html/rfc7230)
> 1. [RFC 7231, HTTP/1.1: Semantics and Content](https://tools.ietf.org/html/rfc7231)
> 1. [RFC 7232, HTTP/1.1: Conditional Requests](https://tools.ietf.org/html/rfc7232)
> 1. [RFC 7233, HTTP/1.1: Range Requests](https://tools.ietf.org/html/rfc7233)
> 1. [RFC 7234, HTTP/1.1: Caching](https://tools.ietf.org/html/rfc7234)
> 1. [RFC 7235, HTTP/1.1: Authentication](https://tools.ietf.org/html/rfc7234)