Skip to content

HTTP

In one line

HTTP (HyperText Transfer Protocol) is the set of rules browsers and servers use to request and send web resources.

In simple words

HTTP is the language of the web. When you type a URL or click a link, your browser sends an HTTP request to a server. The server processes the request and sends back an HTTP response — usually an HTML page, an image, JSON data, or an error code.

Each HTTP message has a method (what you want to do), a URL (what you want it done to), headers (metadata), and an optional body. The most common methods are GET (fetch a resource), POST (submit data), PUT (replace a resource), and DELETE (remove a resource).

HTTPS is the secure version of HTTP — the same protocol but encrypted with TLS. Every response carries a status code: 200 means success, 404 means not found, 500 means server error. Understanding these codes helps you debug web applications.

Example

http
GET /users/42 HTTP/1.1
Host: api.example.com
Accept: application/json

---

HTTP/1.1 200 OK
Content-Type: application/json

{ "id": 42, "name": "Ada" }

A GET request for /users/42 and the server's 200 OK response with a JSON body.

How it works

  1. The browser sends an HTTP request with a method (GET/POST/...), URL, and headers.
  2. The server processes the request and finds the requested resource.
  3. The server returns an HTTP response with a status code, headers, and body.
  4. The browser renders the response (HTML) or hands it to JavaScript (JSON).

Related terms

Related Resources

Related Lessons

  • HTTP

    Learn HTTP methods, headers, and status codes

Related Practice

Related Tools

  • JWT Decoder

    Inspect JWT tokens used in HTTP auth headers

Learn the fundamentals

Deepen your understanding with structured lessons on this topic.

View lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary