Whilst the Internet connects computers and servers together, HTTP is how computers and servers communicate over the internet.
In a nutshell
HTTP (Hypertext Transfer Protocol) is a sequence of sessions between a client (in most cases a web browser) and a server.
A session is when the client sends a request to the server and then the server responds with a file to transfer. Within these sessions, a set of specifications are also defined.
As you can see in the example above an HTTP request can be made by simply entering
http://johnsgoods.com/bench.jpg into the url address bar of our client.
HTTP requests contain request fields with their values. In our example these Request Fields are
Types of HTTP requests
There are different types of requests that a client can make.
GET – If the client can wants to view or read information.
POST – If the client wants to change information on the server.
This table outlines all the request header fields that you can use.
When the server recieves a request it’ll fetch and transmit the requested file along with specifications of that file, in our example it provides details of the date the file was created.
HTTP Response status codes
In the previous example the HTTP response incliuded an HTTP respinse code of 200. 200 means that the data requested has successuly been found.
However an HTTP response might not find the requested file, or perform the action from the HTTP request. So it’ll trespins with a ifferent rspind code.
You may come across other response codes, such asl
404 – This means that no data has been found
500- This means that there is an unexpected error with the server
Last modified: August 27, 2017