- Asked 2/10
- 2074 Bhadra · 4 marks
- 2073 Bhadra · 4 marks
Short note: HTTP
Short answer
HTTP is an application-layer protocol for the Web, using TCP port 80 for request-response between client and server. It is stateless, supports persistent connections, uses methods like GET/POST, and returns status codes (e.g., 200 OK, 404 Not Found) with MIME-typed content.
Write a short note on HTTP.
HTTP (HyperText Transfer Protocol) is the application layer protocol of the World Wide Web. It defines how browsers (clients) request web objects and how web servers respond. HTTP/1.0 is RFC 1945, HTTP/1.1 is RFC 2616 (updated by RFC 7230-7235), and HTTP/2 is RFC 7540.
Key features
- Uses TCP, default port 80 (HTTPS uses TLS, port 443).
- Request/response model: client sends a request, server returns a response.
- Stateless: the server keeps no record of past requests; cookies are used to add state.
- Supports persistent (keep-alive) and non-persistent connections.
- Works with any content type (text, image, video) identified by MIME types.
Messages
- Request: request line (
GET /index.html HTTP/1.1), headers, blank line, body. - Response: status line (
HTTP/1.1 200 OK), headers, blank line, body.
Methods: GET, POST, HEAD, PUT, DELETE, OPTIONS, TRACE, CONNECT.
Status codes
| Code | Meaning |
|---|---|
| 200 | OK |
| 301 | Moved permanently |
| 304 | Not modified |
| 400 | Bad request |
| 404 | Not found |
| 500 | Server error |
Related ideas: web caching with conditional GET, cookies, proxies and HTTPS for security.
✓ Answer checked by Claude Opus 5.5 (high effort)