What I’ve missed from HTTP 1.1
Should I remember name of HTTP 1.1 RFC 2616 or RFC 2068 specification?
That describes HTTP-Messages: Request and Response.
GET, POST, PUT, DELETE, OPTIONS… Well, section 9 defines 3 more — HEAD, TRACE, CONNECT. But not PATCH, LINK, UNLINK methods, that presents only in 2068 version of the spec.
From section 10 we can retrieve information about response codes:
- 1xx — Informational — as example 100 Continue
- 2хх — Successful — as example 201 Created
- 3xx — Redirection — as example 301 Moved Permanently
- 4xx — Client Error — as example 401 Unauthorized
- 5xx — Server Error — as example 500 Internal Server Error
Section 14 informs us about 47 defined by the protocol headers:
Accept, Accept-Charset, Accept-Encoding, Accept-Language, Accept-Ranges, Age, Allow, Authorization, Cache-Control, Connection, Content-Encoding, Content-Language, Content-Length, Content-Location, Content-MD5, Content-Range, Content-Type, Date, ETag, Expect, Expires, From, Host, If-Match, If-Modified-Since, If-Non-Match, If-Range, If-Unmodified-Since, Last-Modified, Location, Max-Forwards, Pragma, Proxy-Authenticate, Proxy-Authorization, Range, Referer, Retry-After, Server, TE, Trailer, Transfer-Encoding, Upgrade, User-Agent, Vary, Via, Warning, WWW-Authenticate.
By adding headers and using response codes protocol implements Caching, Content Negotiation and Authorization.
Is it stateless? Yes, till we start use session and/or cookie mechanism.