The Hypertext Transfer Protocol (HTTP) is the foundation of the World Wide Web, and is used to load webpages 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 requesting a server, which sends a response message.
What is 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
What is an HTTP method?
An HTTP method, sometimes referred to as an HTTP verb, indicates the action that the HTTP request expects from the queried server. HTTP methods are POST, GET, PUT, PATCH, and DELETE.
What are HTTP request headers?
HTTP headers contain text information stored in key-value pairs, and they are included in every HTTP request and response. These headers communicate core information, such as what browser the client is using and what data is being requested.
What is in an HTTP request body?
The body of a request is the part that contains the body
of information, the request is transferring. The body of an HTTP request contains any information added as a payload.
What is an HTTP response?
An HTTP response is what web clients receive from an internet server in answer to an HTTP request. These responses communicate valuable information based on what the client is asking for.
A typical HTTP response code contains:
an HTTP status code
HTTP response headers
optional HTTP body
What is an HTTP status code?
HTTP status codes are 3-digit codes most used to indicate whether an HTTP request has been successfully completed. Status codes are broken into the following 5 blocks.
1xx information
2xx Success
3xx Redirection
4xx Client Error
5xx Server Error
The xx
refers to different number between 00 and 99.