HTTP is the protocol for web communication. HTTPS adds encryption via TLS.
HTTP basics:
- Request: Method (GET, POST, PUT, DELETE), path, headers, body
- Response: Status code, headers, body
- Stateless: Each request is independent
Status codes:
- xx: Success
- xx: Redirect
- xx: Client error (, )
- xx: Server error ( internal, unavailable)
TLS handshake (simplified):
. Client hello (supported ciphers) . Server hello (chosen cipher, certificate) . Key exchange . Encrypted communication begins
Interview question: "What happens when you type a URL in your browser?"