What's New

Getting Started with HTTP

By Devansh Bordia on June 09, 2019

Getting Started with HTTP and basic request methods on the Web?

HTTP is defined as Hypertext Transfer Protocol which standard way of communicating and requesting for websites over the internet. It is the most common protocol used on the web and responsible for fetching and displaying the contents of the webpage by using the request-response cycle. It is application layer protocol used and is not secure as the data is being transmitted in plain-text or clear text which can be easily eavesdropped by the hacker to sniff the credential over the network.

                                                    
                                                           Reference-Google Images




Features of HTTP:

  1. HTTP is stateless protocol it means each and every request is independent of itself because the stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests. HTTP is a stateless protocol, which means that connection between the browser and the server is lost after the response.
  2. HTTP is a plain-text protocol which means the communication between the website and server is not encrypted or data is sent across the network in clear text(without any transformation).
  3. It works on request-response cycle that means if the client wants to access a particular resource on the remote server then must send an HTTP request which is standardly used by clients to form a valid HTTP request according to RFC2616 and sends it to server in using URL (Uniform Resource Locator) and it is interpreted by sever and send the resource in the form of HTML and response containing information about resource, status code, HTTP response headers.
  4. It uses TCP connection for sending and receive on data on the web and before the request is send to a server there is 3 way TCP handshake required in order to establish the connection to the server.
  5. The default port for HTTP IS 80. Port is used to identify process or service on the remote or local machine. It is a logical path or communication channel for exchanging information with different server and machines over the internet.                

    HTTP Request Headers
HTTP Response Headers

What are HTTP Methods and different types of methods used for communication over the web?

HTTP Method is a type of request or operation that is to be performed on resource requested by the client executed by the web server. The type of request made by the client is called the HTTP verb of the request. The verb indicates the action to perform on the resource. There are mainly 6 request methods used on the internet.

HTTP Verbs
  1. GET- It used to retrieve information or request for the resource from the requesting web server. The input parameters are in getting request which is used to get input from user in HTML document and process it to the PHP script for storing in the server.
  2. POST-It is used for uploading files and data to a remote server. The post request is used to submit form, files, data.
  3. OPTIONS: This method is used to display all the available methods for requesting the resource on the server.
  4. HEAD: It is similar to GET but doesn’t retrieve message content from in the HTTP response.
  5. TRACE-It is used for network diagnostics and troubleshooting if the request fails.
  6. DELETE-It is used to delete resource or file on the server. It is the most dangerous request as it could delete the files or data on the server.

No comments

Check out our Handpicked Products and Avail Great Discounts Now

We choose products from Amazon which provide great value and update the list daily.