Skip to content
Getting Digital

HTTP

Also: HTTP/1.1, HTTP/2, HTTP/3, HTTPS, request and response, status codes

HTTP is the request-and-response protocol of the web: a client sends a method, a path and headers, a server answers with a status code, headers and a body, and each exchange stands alone unless the two sides agree to carry state in a header.

Our take. Every web developer should be able to read a raw HTTP exchange by eye, and most cannot, because frameworks hide it and the frameworks' abstractions leak exactly when something breaks. The protocol is small: a handful of methods, a few dozen status codes, and headers that carry everything else. Learn it once and every framework becomes a thin wrapper you can see through.

A request is a line naming a method and a path, a set of headers, and optionally a body. A response is a status line, a set of headers, and usually a body. That is the whole shape, and it has not changed since the protocol's first versions, even as the transport underneath moved from one connection per request to multiplexed streams to a different transport protocol entirely. Each request is independent: the server does not remember the previous one unless a header, usually a cookie or an authorisation token, carries the memory. Every session, login and shopping cart on the web is built on top of that statelessness by choice, and understanding that choice explains most of the security and caching behaviour a developer meets.

Status classMeansExamples worth knowing
2xxSuccess200 OK, 201 Created, 204 No Content
3xxGo elsewhere301 permanent redirect, 302 temporary, 304 not modified since you last asked
4xxYour request is wrong400 malformed, 401 not authenticated, 403 not allowed, 404 not found, 429 too many requests
5xxThe server failed500 generic failure, 502 and 504 the thing behind the server failed or timed out
  • GET reads and must not change anything; browsers and caches assume so.
  • POST submits something new and may change state; repeating it may create a duplicate.
  • PUT replaces a resource at a known address; repeating it is harmless, which is the property the API designs on this site's REST page lean on.
  • PATCH changes part of a resource; DELETE removes one.
  • Headers carry the rest: content type, caching instructions, authentication, the host being addressed, and the cookie that turns a stateless protocol into a session.

In practice

A page loads slowly and the team argues about the database. Someone opens the browser's network panel and reads the exchange: the first request returns a 302 to a login check, the login check returns a 302 back, the page then returns 200 after four hundred milliseconds, and eleven images return 200 with no caching headers at all, each fetched afresh on every visit. The database is fine. Two redirects that should be one, and a cache header nobody set, are the whole delay, and both were visible in the raw exchange to anyone who could read it.

Versions changed the transport, not the shape

HTTP/1.1 opened a connection per request and later reused it; HTTP/2 multiplexes many requests over one connection and compresses headers; HTTP/3 moves to a new transport protocol over UDP to remove head-of-line blocking. A developer reading requests and responses sees the same methods, headers and status codes in all three. What changed is how fast the page arrives, which is why the versions matter to the hosting decision and rarely to the code.

Often confused with

SSL/TLS
HTTPS is HTTP carried inside a TLS connection. TLS supplies encryption and the server's identity; HTTP supplies the request and response inside it. The padlock is TLS's; the status code is HTTP's.
REST API
REST is a style of designing APIs that uses HTTP's methods and status codes as they were meant. HTTP is the protocol; REST is one disciplined way to use it, and many APIs use HTTP without being RESTful.
Web Server
A web server is the program that receives HTTP requests and sends responses. HTTP is what it speaks. The same protocol is spoken by proxies, load balancers, CDNs and the browser, none of which is the web server.

Key takeaways

  • Method, path, headers, body; status, headers, body. That is the whole shape.
  • Stateless by design; cookies and tokens add memory deliberately.
  • Read the raw exchange when something breaks; the framework's abstraction is where the leak is.

Certifications that test this

Vendor exams whose syllabus covers this concept — facts, cost and a preparation path on each page.

More courses from these shelves

A rotating selection from the course directory, drawn from the subcategories where this concept is taught rather than picked for it. Details, price and the provider link are on the course page.

Complete Full Stack Development with MERN

Course Description:Get ready to embark on an exciting journey into the world of full-stack web development. Welcome to…

Udemy

Python for Complete Beginners Create Mini Games

Welcome to the course: Python for Complete Beginners Create Mini GamesMost beginners study core part of the programming…

Udemy

Next. js & Laravel 11 Build a Modern Full-Stack Application

Next.js & Laravel 11 Build a Modern Full-Stack ApplicationUnlock the power of modern web development with Next.js and L…

Udemy

Solid Principle with real world and live coding example

It's essential to understand the foundational ideas behind SOLID. Writing good code will come naturally to you once you…

Udemy

Portfolio Project: Blogging App with Nest JS

Are you ready to take your NestJS skills to the next level by building a complete, real-world application from scratch?…

Udemy

Complete JavaScript Full Stack Course 2025 From A - Z

JavaScript is the most popular programming language for both front-end and back-end web development. Applications for J…

Udemy

FAQ

What is the difference between HTTP and HTTPS?
HTTPS is the same protocol carried inside an encrypted, authenticated TLS connection. Nothing about the requests and responses changes; what changes is that nobody on the path can read or alter them, and the browser can verify which server it reached.
Why does it matter that HTTP is stateless?
Because every mechanism for remembering a user, from cookies to bearer tokens, is added on top and has to be secured on its own. It also means any server can answer any request, which is what makes load balancing and caching straightforward. The design choice shapes both security and scale.
Do I need to know HTTP/2 and HTTP/3?
Enough to know they change how fast the same requests arrive, not what the requests contain. Choosing a host or CDN that speaks them is a performance decision; the code you write sends the same methods and reads the same status codes.

Sources

The primary text this definition rests on. Read it before you trust ours.

Last reviewed 13 September 2026 · Getting Digital