Home

HTTPprotocol

HTTP (Hypertext Transfer Protocol) is an application layer protocol used for transferring data on the World Wide Web. It enables clients and servers to exchange requests and responses and typically runs over TCP. When protected by TLS, HTTP operates as HTTPS. The protocol is defined by RFCs issued by the IETF and has evolved since its origins in the early 1990s as part of Tim Berners-Lee’s web architecture.

HTTP follows a request–response model. A client sends a request with a method, a target URI, and

Common methods include GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, and TRACE. Status codes are grouped into

Versions and evolution: HTTP/1.0 introduced simple connections; HTTP/1.1 added persistent connections and Host headers. HTTP/2 uses

an
HTTP
version,
followed
by
headers
and
an
optional
body.
The
server
replies
with
a
status
line,
headers,
and
an
optional
body.
HTTP
is
stateless
by
default;
state
is
usually
maintained
with
cookies
or
tokens.
classes,
such
as
2xx
(success),
3xx
(redirection),
4xx
(client
errors),
and
5xx
(server
errors).
Headers
convey
metadata
like
content
type,
length,
caching
directives,
and
authentication.
Features
include
content
negotiation
and
caching
with
Cache-Control,
ETag,
If-Modified-Since,
and
Expires.
binary
framing,
multiplexing,
header
compression,
and
server
push.
HTTP/3,
built
on
QUIC,
aims
to
reduce
latency.
Security
practices
emphasize
HTTPS,
HSTS,
and
proper
certificate
validation.
Typical
ports
are
80
for
HTTP
and
443
for
HTTPS.