HTTP and HTTPS Basics
Understand request/response structure, TLS handshake, and why HTTPS matters for security.
What is HTTP?
HTTP (Hypertext Transfer Protocol) is the foundation of web communication. It defines how browsers request resources from servers and how servers respond. HTTP is stateless — each request is independent.
HTTP Request Structure
An HTTP request has:
- Method: GET, POST, PUT, DELETE, PATCH, OPTIONS
- URL: the resource path
- Headers: metadata (Content-Type, Authorization, User-Agent)
- Body: data sent with POST/PUT requests
GET /api/users HTTP/1.1
Host: example.com
Authorization: Bearer eyJhbGc...