HTTP:
Ø It
is Hyper
Text Transfer Protocol
Ø It
is an application-level protocol
for distributed,
collaborative,
hypermedia
information
systems.
Ø This
is the foundation for data communication for the World
Wide Web (i.e. internet) since 1990.
Ø HTTP
is a generic and stateless protocol
which can be used for other purposes as well using extensions of its request
methods, error codes, and headers.
Ø Basically,
HTTP
is a TCP/IP based communication protocol, that is used
to deliver data (HTML files, image files, query results,
etc.) on the World Wide Web.
Ø The
default port is TCP 80, but other ports can be used as well.
Ø It
provides a standardized way for computers to communicate with
each other.
Ø
HTTP specification specifies how
clients' request data will be constructed and sent to the server, and how the
servers respond to these requests.
Basic Features
Ø There
are three basic features that make HTTP a simple but powerful protocol:
· HTTP is
connectionless: The HTTP client i.e. a browser initiates an HTTP request and after a
request is made, the client disconnects from the server and waits for a
response. The server processes the request and re-establishes the connection
with the client to send a response back.
· HTTP is
media independent: It means, any type of data can be sent by HTTP as long as
both the client and the server know how to handle the data content. It is
required for the client as well as the server to specify the content type using
appropriate MIME-type.
· HTTP is
stateless: As mentioned above, HTTP is connectionless and it is a direct
result of HTTP being a stateless protocol. The server and client are aware of
each other only during a current request. Afterwards, both of them forget about
each other. Due to this nature of the protocol, neither the client nor the
browser can retain information between different requests across the web pages.
Ø The
HTTP protocol is a request/response protocol based
on the client/server based architecture
where web browsers, robots and search engines, etc. act like
HTTP clients, and the Web
server acts as a server.
Client:
Ø The
HTTP client sends a request to the server in
the form of a request method, URL, and protocol version, followed by a
MIME-like message containing request modifiers, client information, and
possible body content over a TCP/IP connection.
Ø
(Note: One can classify URIs as locators (URLs), or as names (URNs), or as
both. A Uniform Resource Name (URN) functions like a person’s name, while a
Uniform Resource Locator (URL) resembles that person’s street address. In other
words: the URN defines an item’s identity, while the URL provides a method for
finding it.)
Server:
Ø The
HTTP 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 meta information,
and possible entity-body content.
Ø HTTP
protocol 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.
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 http://ecomputernotes.com, A URL has three parts: Method: //Host/Path. which is used for accessing any file, document or website.
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 http://ecomputernotes.com, 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. Some common codes are shown below.
1.401-“Unauthorized”
2.400-“Bad request”
3.404-“File not found”
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. Some common codes are shown below.
1.401-“Unauthorized”
2.400-“Bad request”
3.404-“File not found”
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.