What is HTTP?

The foundation protocol for data communication on the World Wide Web.

Detailed Explanation

HTTP is an application-layer protocol that defines how web browsers and servers communicate. It uses a request-response model where clients send requests (GET, POST, etc.) and servers respond with status codes and content. HTTP is stateless, meaning each request is independent. Modern web applications often use HTTP/2 or HTTP/3 for improved performance.

Examples

  • Loading a webpage: browser sends GET request to server
  • Submitting a form: browser sends POST request with data
  • Status codes: 200 OK, 404 Not Found, 500 Server Error