HTTP
Hypertext Transfert Protocol
The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used to load web pages using hypertext links. HTTP is an application layer protocol designed to transfer information between networked devices and runs on top of other layers of the network protocol stack. A typical flow over HTTP involves a client machine making a request to a server, which then sends a response message.
What’s in an HTTP request?
An HTTP request is the way internet communications platforms such as web browsers ask for the information they need to load a website.
Each HTTP request made across the Internet carries with it a series of encoded data that carries different types of information. A typical HTTP request contains:
HTTP version type
a URL
an HTTP method
HTTP request headers
Optional HTTP body.
Source: Cloudflare.
What’s an HTTP method?
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. Although they can also be nouns, these request methods are sometimes referred to as HTTP verbs.
The
GETmethod requests a representation of the specified resource. Requests usingGETshould only retrieve data.The
HEADmethod asks for a response identical to that of aGETrequest, but without the response body.The
POSTmethod is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.The
PUTmethod replaces all current representations of the target resource with the request payload.The
DELETEmethod deletes the specified resource.The
CONNECTmethod establishes a tunnel to the server identified by the target resource.The
OPTIONSmethod is used to describe the communication options for the target resource.The
TRACEmethod performs a message loop-back test along the path to the target resource.The
PATCHmethod is used to apply partial modifications to a resource.
Source: MDN.
Last updated
Was this helpful?
