by Dinesh Thakur Category: Services and Applications

What is http: HTTP full form HyperText Transfer Protocol used mainly to access data on the World Wide Web. HTTP is a Server and Client communication Protocol, which is primarily set of rules for formating and transferring webpage data (text, images, video and Multimedia files) over the world wide web. This is the Protocol used to create communication between Web Servers and Web Users. HTTP is an application layer Protocol that works on the top of the TCP/IP suite of Protocols.

HTTP protocol basically uses server and client model. It acts as a request-response protocol. For Example, A client which is use web browser and a server is a Web host that hosts the website. Whenever a client transmits a request to the Website server, HTTP protocol proceeds that request and creates a connection between client and server through TCP. After that HTTP sends a request to the server, which picks up the requested data and HTTP sends the response back to the client. Let's look into the depth how these requests work.

Hypertext Transfer ProtocolHTTP protocol functions like a combination of FTP and SMTP. It is similar to FTP because it transfers files and uses the services of TCP. However, it is much simpler than FTP because it uses only one TCP connection. There is no separate control connection; only data is transferred between the client and the server.
HTTP protocol is like SMTP protocol because the data transferred between the client and the server look like SMTP messages. In addition, MIME-like headers control the format of the messages. However, HTTP differs from SMTP in the way the messages are sent from the client to the server and from the server to the client. Unlike SMTP, the HTTP messages are not destined to be read by humans; they are read and interpreted by the HTTP server and HTTP client (browser). SMTP messages are stored and forwarded, but HTTP messages are delivered immediately.
The idea of HTTP protocol is very simple. A client sends a request, which looks like mail, to the server. The server sends the response, which looks like a mail reply, to the client. The request and response messages carry data in the form of a letter with MIME-like format.
The commands from the client to the server are embedded in a letter-like request message. The contents of the requested file or other information are embedded in a letter-like response message.

HTTP Request Methods

Http Protocol can use two case sensitive request-response Methods between client/server such as GET and POST that are used to handle form submissions.

GET Method

A GET Requests data from a specified resource using a given URI to retrieve data.

POST Method

A POST request Submits data to be processed to a specified resource to the server.
NOTE: URLs that start with "http://" are use port 80 by default and URL with "https://" are secure connection use port 443.

Differences between "GET" and "POST" Methods

"GET" is basically appends limited amount of variable and their values to the URL string because data is sent in header. It is non secure connection because variable and their values are exposed in URL.
"POST" appends large amount of data, because of data is sent in the message body.It is secure connection because variable and their values are not exposed in URL.

What is an HTTP request?

A Http request message consists of a request line, headers and sometimes a body.
An HTTP request is a way that web browsers ask for information to load website pages. HTTP request contains HTTP version type, a URL, HTTP request headers and HTTP body.
HTTP request Headers: HTTP request headers include text information saved in key-value pairs and these are contained in every HTTP request.
URL: A client that wants to access a document needs an address. To facilitate the access of documents distributed throughout the world, HTTP protocol uses the concept of locations. The World Wide Web uses a locator called a URL to identify and intertribal data.
URL is called as (Uniform Resource Locator). A URL is an internet address of any website in common format, A URL has three parts: Method: //Host/Path. which is used for accessing any file, document or website.

What is an HTTP response?

An HTTP response means when the web client gets the answer back from the web server. It contains the information that was asked for in the HTTP request. HTTP response contains an HTTP status code, HTTP response headers, and HTTP body.
HTTP status codes: Many times when a client sends a request to the server and If the HTTP request is not correct then the error comes. These errors are shown in numeric codes. These are also called as HTTP status codes. These status codes are given by the server to identify the problem. If a client does not know the difference between codes how a client can solve the problem so the client has to know about every code. Some common codes are shown below.
2.400-“Bad request”
3.404-“File not found”
HTTP is a stateless protocol: HTTP is a stateless protocol and it was likewise necessary. Because it executes every command independently without knowing the other commands those came before it. Otherwise, if a client sends multiple requests to the web server, the web server will handle multiple requests from one connection for a long time. That's why HTTP is a stateless protocol.

What is HTTPS?

HTTPS is a Hyper Text Transfer Protocol Secure. This is the secure version of HTTP Protocol. HTTPS means a secure layer between client and server. HTTPS encrypted our data by Transport Security Layer (TLS). HTTPS is a sign of security most of the websites are secured with HTTPS.

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Search Content