Interview Prep/Networking/HTTP, TLS & Certificates

What is the structure of an HTTP request and response?

BeginnerConceptHTTP, TLS & Certificates
Answer

A request has a request line (method, path, version), headers, a blank line and an optional body. A response has a status line, headers, a blank line and a body.

curl -v https://example.com/health
# > GET /health HTTP/2
# > Host: example.com
# < HTTP/2 200
# < content-type: application/json

HTTP is stateless: cookies, tokens and sessions carry state.

All Networking questions Roadmap: Networking for DevOps

More on HTTP, TLS & Certificates