Web & APIs

HTTP / HTTPS

/ AYCH-tee-tee-pee /

HTTP is the simple back-and-forth that the whole web is built on: your browser sends a request ('please give me this page'), and a server sends back a response ('here it is'). Every page you open, image you load, and form you submit is really just one of these little request-and-reply exchanges.

Each request names a method — GET to fetch something, POST to send something — points at a URL, and comes back with a status code (200 if all went well, 404 if the thing wasn't there). It's a polite, stateless conversation: each request stands on its own, and the server forgets you the moment it's done.

HTTPS is the exact same conversation, just locked inside an envelope. The S is for secure: the connection is encrypted (via TLS), so no one snooping on the wire can read or tamper with what's passing through — which is why the padlock shows in your address bar. These days plain HTTP is treated as unsafe, and HTTPS is simply the default.

$ curl -i https://example.com
HTTP/2 200
content-type: text/html; charset=UTF-8

A request goes out; a response comes back with status 200 — success.

Stateless means each request is a clean slate — that's why sites use cookies and tokens to remember who you are.

Also called
hypertext transfer protocolhttp requesthttp responsetlsssl