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 dataPUTPATCHDELETEOPTIONS200 Ok400 Bad Request500 Internal Server Error200 OK201 Created301 Moved Permanently302 Found304 Not Modified400 Bad Request401 Unauthorized403 Forbidden404 Not Found500 Internal Server Error501 Not Implemented502 Bad Gateway503 Service Unavailable504 Gateway TimeoutRepresentational 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.