HTTP & HTTPS Protocols Cheat Sheet

HTTP methods, status codes, headers, caching, HTTP/2 multiplexing, HTTP/3 QUIC, and the HTTPS security layer essentials.

Last Updated: July 15, 2025

HTTP Methods

MethodSafeIdempotentUse Case
GETRead resource — no side effects
POSTCreate resource — repeated calls create duplicates
PUTFull replace — same body same result
PATCHPartial update — non-idempotent by default
DELETERemove resource — second call is 404
HEADLike GET but no body — check existence
OPTIONSCORS preflight — allowed methods/headers

Status Code Ranges

RangeMeaningKey Codes
1xxInformational100 Continue, 101 Switching Protocols
2xxSuccess200 OK, 201 Created, 204 No Content
3xxRedirection301 Permanent, 302 Found, 304 Not Modified
4xxClient Error400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests
5xxServer Error500 Internal, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout

Essential Headers

HeaderDirectionPurpose
Content-TypeBothMedia type — application/json, text/html
AuthorizationRequestBearer token, Basic auth, API key
Cache-ControlBothmax-age, no-cache, no-store, private
ETag / If-None-MatchBothConditional requests — 304 caching
Access-Control-Allow-OriginResponseCORS — which origins may read
Set-CookieResponseHttpOnly, Secure, SameSite attributes

HTTP/2 & HTTP/3

FeatureHTTP/1.1HTTP/2HTTP/3
TransportTCPTCPQUIC (UDP)
MultiplexingNo (6 conn limit)Streams per connectionStreams, no HoL blocking
Header CompressionNoneHPACKQPACK
Server PushNoYes (deprecated)WebTransport
TLSOptionalDe facto requiredBuilt-in (TLS 1.3)
Pro Tip: Use HTTP/2 or HTTP/3 whenever possible — multiplexing eliminates head-of-line blocking and connection limits that plague HTTP/1.1.
Part of the Empire Builder Network