Http

Increasing Application Performance with HTTP Cache Headers

 * https://devcenter.heroku.com/articles/increasing-application-performance-with-http-cache-headers

http message 组成

 * start line (起始行)
 * header (首部)
 * body (主体)

request message format
 

GET /test/hi-there.txt HTTP/1.1 Accept: */* Host: www.joes-hardware.com

response message format
 

HTTP/1.0 200 OK Content-type: text/plain Content-length: 19 Hi! I'm message!

HTTP response code

 * 状态码分类


 * https://httpstatuses.com/
 * https://zh.wikipedia.org/wiki/HTTP%E7%8A%B6%E6%80%81%E7%A0%81
 * https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

two Content-Type header for form submission
Content-Type: application/x-www-form-urlencoded # default for html forms Content-Type: multipart/form-data # used when form contains files, non-ascii, binary data