What Is an HTTP Request
By Tobias Geisler Mesevage
There are nearly 2 billion websites on the Internet – and that figure is growing each day. The world’s first website was published on Aug. 6, 1991, by physicist Tim Berners Lee, who is credited with initiating the development of Hypertext Transfer Protocol (HTTP) in 1989.
HTTP is an application-level protocol for distributed, collaborative, hypermedia information systems, according to the World Wide Web Consortium (W3C), and is the method of communication used to request and receive data on the Web.
Most of us type website addresses into a browser’s address bar without any thought to the process and intricate code required to pull up that website. In this article, we’ll reveal the intricacies of an HTTP request, and break down the process – from search to results.
What Is an HTTP Request?
HTTP is the foundation for communication on the World Wide Web. Berners-Lee envisioned a global superhighway of hyperlinked information – a cleaner, more efficient method with which to manage data of all types.
Four elements make up the World Wide Web:
- HTML (HyperText Markup Language): A textual format to represent hypertext documents
- HTTP (HyperText Transfer Protocol): A simple protocol to exchange these documents
- World Wide Web: A client to display these documents
- Web server: A server to give access to the document
The Web, as we know it today, uses Uniform Resource Locators (URLs) to identify documents and web resources. The resources available on the Web are accessed via HTTP or HTTPS, application-level Internet protocols.
Web pages often contain several types of data – video, text, and images – which require different resources to both store and download. HTTP enables multiple connections to download separate elements at the same time, speeding up the transmission of the web page.
There are four versions of HTTP: HTTP/0.9; HTTP/1.0; HTTP/1.1; and HTTP/2.0. The most commonly used today is HTTP/1.1
- HTTP/0.9: The initial, very simple version that only accommodates one-line requests.
- HTTP/1.0: Allows for HTTP headers, for both request and response, allowing transmission of metadata. This version also made the protocol more flexible and extensible.
- HTTP/1.1: Refers to a Standardized Protocol, and allows for reuse of connections, pipelining, and content negotiation.
- HTTP/2.0: As web pages become more complex, with an increasing number of visual elements and scripts, more data transmits via HTTP requests. HTTP/2.0 is a multiplexed protocol that handles parallel requests over the same connection.
How Does an HTTP Request Work?
HTTP is an example of a request-response method of communication between computers, in which requests for data are sent by a user (in this case, a web browser) to a server, which will respond to the request. Browsing the Web and clicking on web pages is an example of response-request communication.
While this is a simplistic description of a complex process that involves multiple proxies – routers, modems, etc. – HTTP sits atop this process, at the application layer.
HTTP essentially defines a set of request methods that explain the action to be performed. While they can be nouns, the request methods are typically HTTP verbs, such as GET, POST, and DELETE. These methods define what the user is looking for, i.e., fetch a resource (use GET) or post the value of HTML form (use POST).
HTTP vs. HTTPS
HTTP is designed to be simple messages that can be read and understood by humans, which allows for easier testing for developers.
By design, HTTP is intended to be extensible, to allow for experimentation and new functionality.
HTTP transfers resources using Transmission Control Protocol (TCP), which manages the channels between your browser and the server. HTTP is the language that devices on both sides use and follow to communicate with one another.
More and more websites support HTTPS – the secure version of the standard HTTP used when communicating with websites. The “S” in HTTPS stands for “secure.” HTTPS allows for encrypted data to be sent and received over the Internet. HTTPS is helpful when transmitting sensitive or personal data.
To support HTTPS, businesses must apply for and obtain a certificate from a Certificate Authority.
If you enjoyed this article, here are three more articles from our “Let’s Get Technical” series you might like: