The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.
GET /archive HTTP/1.1
Host: tunjs.github.io
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2416.0 Safari/537.36
Referer: http://tunjs.github.io/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cookie: ...
BODY...
METHOD PATH PROTOCOL_VERSION
HEADERS
BODY...
HTTP/1.1 200 OK
Age: 0
Cache-Control: max-age=600
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 981
Content-Type: text/html; charset=utf-8
Date: Fri, 29 May 2015 15:34:58 GMT
Expires: Fri, 29 May 2015 15:44:58 GMT
Last-Modified: Sat, 25 Apr 2015 14:06:51 GMT
Server: GitHub.com
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
X-Cache: MISS
BODY...
PROTOCOL_VERSION STATUS_CODE
HEADERS
BODY...
GET
used to retrieve information with no side effects (changing data)POST
sends data and executues operation which might change dataPUT
PATCH
DELETE
OPTIONS
200 Ok
400 Bad Request
500 Internal Server Error
200 OK
201 Created
301 Moved Permanently
302 Found
304 Not Modified
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
Representational State Transfer (REST) is a software architecture style consisting of guidelines and best practices for creating scalable web services. REST is a coordinated set of constraints applied to the design of components in a distributed hypermedia system that can lead to a more performant and maintainable architecture
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated.