26/01: HyperText Transfer Protocol (HTTP)

Category: Buz Words
Posted by: bagheljas
HyperText Transfer Protocol (HTTP) is a stateless application protocol that runs on top of the TCP/IP, the foundation protocol of Internet. Internet Cookies framework is used to have the statefull behavior. HTTP protocol defines the rules and standards for Web Server also know as HTTP Server (e.g. Apache, IIS etc.) and Web Client also know as HTTP Client ( e.g. Internet Explorer, Firefox, Chrome etc. ) data exchange based on request and response paradigm.

Good to know:
  • Uniform Resource Locator (URL) is used for submitting a request from a Web Client. Usually an URL consist of Protocol, Host Address (DNS Name / IP Address), Port* and Uniform Resource Identifier (URI)*. Please note that Port and URI in an URL are the optional fields and when they are not present, default values are used. URI default value is decided by Web Server while port default values are from HTTP rules and standards. Usage patterns of the URLs are
    • protocol://hostAddress
    • protocol://hostAddress/URI
    • protocol://hostAddress:port/URI
    • protocol://hostAddress:port
  • Web Server Daemon's default listening ports are 80 (http) and 443(https).
  • The Request and Response message consist of an header and an optional message body. The key parameter of a request is HTTP method and of a response is HTTP status code.
  • The HTTP request methods are OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, and CONNECT. The commonly used HTTP request methods in an web application implementation are
    • GET Submits a request for the identified resource. Optionally capable to take limited data as URI query parameters in header.
    • POST Submits data as part of the message body to the identified resource. Capable to submit large data.
    • HEAD Same as GET, but request gets an response without message body.
  • The response status codes are divided into four categories 1xx Informational, 2xx Success, 3xx Redirection, 4xx Client Error, and 5xx Server Error. The commonly seen HTTP response status code are
    • 200 OK
    • 301 Moved Permanently
    • 302 Temporary Redirection
    • 304 Not Modified
    • 401 Not Authorized
    • 403 Forbidden
    • 404 Not Found
    • 500 Internal Server Error
    • 501 Not Implemented
    • 502 Bad Gateway
    • 503 Service Unavailable
  • HTTPS provides the Transport Layer Security (TLS) for the data exchange between Web Client and Web Server built on Public Key Infrastructure (PKI) framework.


Disclaimer

The thoughts expressed in the blog are those of the author and do not represent necessarily the official policy or position of any other agency, organization, employer, or company. Assumptions made in the study are not reflective of the point of view(s) of any entity other than the author. Since we are critically thinking human beings, the point of view(s) is always subject to change, revision and rethinking at any time. While reasonable efforts have been made to obtain accurate information, the author makes no warranty, expressed or implied as to its accuracy.