HyperText Transfer Protocol

Updated Oct 16, 2020 · 4 min read

What is the HyperText Transfer Protocol (HTTP)?

HyperText Transfer Protocol (HTTP) is the protocol used by the Web that defines how messages are formatted and transmitted between devices connected over the Internet. In the client-server model, HTTP is a request-response protocol.

Clients and servers can communicate, through a web browser, by exchanging messages in a predictable format. HTTP defines the predictable format that's used when you make requests on the Internet or serve data to users.

Example

A user opens their web browser and enters a URL. When the users pressed enter, an HTTP command is sent over the Internet to a remote server that retrieves and then transmits the requested data.

Stateless

HTTP is a stateless protocol, which means that the server doesn't have to keep information about the user's session. Developers often use HTTP cookies to allow for stateful sessions.

Status codes

HTTP status codes are transmitted by a server in response to a request from a client. The status codes indicate whether a request was completed successfully. If the request wasn't completed successfully, the code indicates why the request wasn't successful.

Status codes are broken up into the following five classes, where the first digit indicates the type of response:

  • Informational responses (100-199): The request was received and understood.
  • Successful responses (200-299): The request was received and accepted.
  • Redirect (300-399): The client needs to take an action to complete the request.
  • Client errors (400-499): The client made a request that the server couldn't complete.
  • Server errors (500-599): The server failed to complete the request.

HyperText Transfer Protocol Secure (HTTPS)

HyperText Transfer Protocol Secure (HTTPS) is the more secure form of HTTP, in which communication between client and server is encrypted through Secure Sockets Layer (SSL) or Transport Layer Security (TLS).


Related Terms

Programming
HTTP Status Codes

HTTP status codes are transmitted by a server in response to a request from a client. The status codes indicate whether a request was...

Programming
Web Browsers

Web browsers (or “browsers”) are software applications used for accessing and viewing information on the internet.