HTTP

Hypertext Transfer Protocol enabling web client-server communication over TCP/IP networks

Hypertext Transfer Protocol (HTTP)

  • Application layer protocol that enables communication between web clients and servers over TCP/IP networks
  • Uses request-response model where clients (browsers) send HTTP requests and servers return HTTP responses
  • Operates on port 80 for HTTP and port 443 for HTTPS (HTTP Secure with TLS/SSL encryption)
  • Stateless protocol - each request is independent and servers don’t maintain client session information

HTTP Methods

  • GET - Retrieves data from server (most common method)
  • POST - Sends data to server (form submissions, file uploads)
  • PUT - Updates existing resources on server
  • DELETE - Removes resources from server
  • HEAD - Similar to GET but returns only headers

HTTP Status Codes

Code Range Category Examples Meaning
1xx Informational 100 Continue Request received
2xx Success 200 OK, 201 Created Request successful
3xx Redirection 301 Moved, 302 Found Further action needed
4xx Client Error 404 Not Found Client-side error
5xx Server Error 500 Internal Error Server-side error

HTTP vs HTTPS Comparison

Feature HTTP HTTPS
Port 80 443
Encryption None TLS/SSL encrypted
Security Vulnerable Protects data
Certificate Not required Required

Notes

  • HTTP is inherently insecure - all data transmitted in plaintext
  • Modern browsers increasingly require HTTPS for advanced features
  • HTTP/2 and HTTP/3 improve performance through multiplexing
  • Use curl -v or browser developer tools to inspect HTTP headers