HTTP made it gets disconnected from the

HTTP stands for Hyper Text Transfer protocol.
Development of HTTP was initiated by Tim Berners-Lee. It is application layer
protocol which provide the communication between HTTP client and HTTP server.
HTTP protocol mainly used to access data on World Wide Web (WWW).HTTP protocol
use the services of TCP on port 80. HTTP is a protocol to exchange or transfer
of Hypertext. HTTP function is a combination of FTP (File Transfer Protocol)
and SMTP (Simple Mail Transfer Protocol). Basically, HTTP is TCP/IP based
communication protocol that is used to exchange the data on World Wide Web.
This is foundation of data communication for World Wide Web. Standards
development of HTTP was coordinated by Internet Engineering Task Force (IETF).
First version of HTTP was developed in 1991 which is HTTP/0.9. Main function of
HTTP is to transmit data across the internet.

Version:

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

Year

      HTTP Version

1991

0.9

1996

1.0

1997

1.1

2015

2.0

 

Working of HTTP:

·        
An “HTTP client” is a program
that establish a connection and send a request to “HTTP server”.

                                    Communication
between HTTP client and HTTP Server

·        
An “HTTP server” is also one type
of program that accept a request and send response to “HTTP Client”.

Features of HTTP:

There are some basic
feature are describe here.

·  Connectionless:
The HTTP client initiates an HTTP request, after a request is made it gets
disconnected from the server and waits for a response. The server gives the
response to the request received and re-establishes the connection with the
client to send a response back.

·  Independent:
Any type of data can be sent by HTTP but both the client and the server should
know how to handle the data content. It is required by both to specify the
content type using appropriate MIME-type.

·  Stateless:
As HTTP is connectionless it can directly considered as a stateless protocol.
The server and client are aware of each other only while they are doing
transaction with each other. After that, both of them has no knowledge about
each other. Due to this, both client and the server cannot gain information of
each other during different requests across the web pages.

 

HTTP Architecture:

 

 

 

                                      Architecture
of HTTP protocol.

 

The
HTTP protocol is based on a request/response model. The communication generally
takes place over a TCP/IP connection on the Internet. The default port is 80,
but other ports can be used. A requesting program (a client) establishes a
connection with a receiving program (a server) and sends a request to the server
in the form of a request method, URI, and protocol version, followed by a
message containing request modifiers, client information, and possible body
content. The server responds with a status line, including its protocol version
and a success or error code, followed by a message containing server
information, entity met information, and possible body content.

 

HTTP
Aspects:

Methods

Status
code

Request/Response
Line

Message
Handler

 

Methods:

There
are mainly two basic methods of HTTP protocol.

1.
GET

2.
POST

 

1.GET

 

·        
In GET method only limited amount of
data can be sent, because data is sent in header.

·        
GET method is not secure in compare to
POST method because data exposed in URL bar.

·        
GET method is more efficient and more
used than POST method.

·        
GET method can be bookmarked.

·        
GET method is idempotent. That means
second request will be ignored until the response of first request will be
delivered.

·        
GET method send up to 1024 character
only.

·        
GET method can’t be send binary data,
audio, video or any type of image file.

·        
GET method is basically used for retrieving the
information or data from the server using URL.

Anatomy of GET Method:

                
Name1=value1=value2=value3

In GET method, name and value pairs are joined with
equal sign and another pair of name and value are joined with ampersand.

Example:

           

 

2. POST

POST:

·        
In POST method large amount of data can
be sent because data can be sent in body part.

·        
POST method is more secure than GET
method because data can’t be exposed in URL.

·        
POST method is less efficient and less
used than GET method.

·        
POST method can’t be bookmarked.

·        
POST method is non-idempotent.

·        
In POST method there is no limit of data
size to be sent.

·        
In POST method we can sent Binary and
ASCII data.

·        
POST method basically used
to send data or information on the server.

Example:

 

HEAD:

This method is almost similar to GET method but it does not return
the requested data. It is used to transfer header section, status line, server
response code etc.

HEAD is often used to check the following information:

Last-modified date of a document on the server for caching purpose.

Size of a document before downloading.

Server type

Type of requested Document

 

Example:

 

 

PUT:

The PUT method is used to request the server to store the included
entity-body at a location specified by the given URL.

PUT method replace all the current representation of the target
resource with the uploaded content.

 

DELETE:

The DELETE method is used to request the server to delete a file at
a location specified by the given URL.

DELETE method delete the addressed member of the collection.