HTTP Refresher

In this article, I'll try to cover the points that shows how a HTTP protocol works. Before moving into detail, I'll cover the basic about HTTP. The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypertext information systems. 

HTTP has been in use by the World Wide Web (WWW) since 1990. When we go through the specs many places we find the RFC. So, what is RFC? It stands for Request For Comments. a memorandum published by the Internet Engineering Task Force (IETF) describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected system. Presently HTTP/1.1 version is being used by the internet. HTTP/2.0 is being worked on by IETF.
The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server. The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity metainformation, and possible entity-body content.

It uses following parameters:
  1. HTTP Version: "<major>.<minor>" numbering scheme like 1.1 The version of an HTTP message is indicated by an HTTP-Version field.
    HTTP-Version   = "HTTP" "/" 1*DIGIT "." 1*DIGIT
  2. URI (Uniform Resource Identifiers)
  3. Date/Time Formats: All HTTP date/time stamps MUST be represented in Greenwich Mean Time(GMT), without exception.
  4. Character Set: Same as MIME character set
  5. Content Coding: 
  6. Transfer Coding
  7. Media Types
  8. Product Type
  9. Quality Values
  10. Language Tag
  11. Entity Tag
  12. Range Units
 HTTP Message:
  1. Message Type: Client to Server and Server to Client
    HTTP-message   = Request | Response     ; HTTP/1.1 messages
  2. Message Header:
    message-header = field-name ":" [ field-value ]
           field-name     = token
           field-value    = *( field-content | LWS )
           field-content  = <the OCTETs making up the field-value
                            and consisting of either *TEXT or combinations
                            of token, separators, and quoted-string>
  3. Message Body: The message-body (if any) of an HTTP message is used to carry the entity-body associated with the request or response.
    message-body = entity-body
                        | <entity-body encoded as per Transfer-Encoding>
  4. Message Length
  5. General Header Fields:
    general-header = Cache-Control            
                          | Connection        
                          | Date                     
                          | Pragma                   
                          | Trailer                  
                          | Transfer-Encoding        
                          | Upgrade                  
                          | Via                      
                          | Warning                  

Next Article: HTTP Refresher Part II - Request and Response
Do you enjoy this article? please help spread the word. And if you don't, then let me know how I can improve it.