HTTP

What is HTTP?

Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser. HTTP is also a generic protocol, which means that it can be used for other purposes, such as name servers and distributed object management systems, through extension of its request methods, error codes, and headers.

How Does HTTP Work?

HTTP works as a request-response protocol between a client and server. A web browser may be the client, and an application on a computer that hosts a web site may be the server. The client submits an HTTP request message to the server. The server, which provides resources such as HTML files and other content, or performs other functions on behalf of the client, returns a response message to the client. The response contains completion status information about the request and may also contain requested content in its message body.

Examples of HTTP

HTTP is used to request and transmit files over the internet. Common examples of HTTP usage include downloading a web page, downloading an image or video, or submitting a completed web form. Some common HTTP request methods are:

  • GET: Retrieve information from a specified source.
  • POST: Submit data to be processed to a specified resource.
  • HEAD: Same as GET, but only retrieves headers and response codes.
  • PUT: Uploads a representation of the specified resource.
  • DELETE: Removes all current representations of the specified resource.
  • OPTIONS: Describes the communication options for the specified resource.

HTTP is an integral part of the World Wide Web, as it defines how messages are formatted and transmitted, and what actions web servers and browsers should take in response to various commands. For more information about HTTP, please see: