What is HTTP?
HTTP is an application-layer protocol for requesting resources and carrying responses between web clients and servers. Opening a page, fetching API data or submitting a form can involve HTTP communication. The transferred resource does not have to be HTML.
Request and response structure
A client sends a request with an address, method and headers, adding a body when needed. GET commonly reads resources, while POST submits data. The server returns a status code, response headers and content when applicable. A 200 code indicates a successful response, 404 means a resource was not found, and 500 indicates an unexpected server-side error; the code alone does not explain the detailed cause. Headers carry information about content type, caching and authentication. HTTP is fundamentally stateless: sessions use additional mechanisms such as cookies or tokens. Browsers, intermediary caches and reverse proxies may participate in a request, so the visible response may not come directly from the application server.
Versions, security and troubleshooting
HTTP versions differ in connection and transfer efficiency while preserving application concepts such as resources and methods. HTTPS protects HTTP communication with TLS and offers security properties that plain HTTP lacks. However, an HTTPS website can still publish incorrect information or contain application vulnerabilities. Browser developer tools help inspect methods, status codes, timings and headers. If a page opens without displaying its content, for example, the HTML request may have succeeded while an API request failed. Retry designs must consider effects: repeating a read request is not equivalent to resending a request that creates a payment.