Get to Know the HTTP Protocol
The HTTP protocol enables the Internet as we know it today.
The most prevalent form of the internet is a client-server form.
The client (e.g. a web browser) sends an HTTP request to a server which responds with an HTTP response that contains a response code.
i.e. the client requests the server to do something.
The server response codes are divided into 5 families, each family indicate the result of the server’s success to fulfill the client’s request :
1.) 100,101,102,… An informational response indicates that
the request was received and understood
2.) 200,201,202,… success
3.) 300,301,302,… redirects
4.) 400, 401, 402,… client errors
5.) 500, 501, 502, … server errors
The HTTP protocol is comprised from:
The Header is used to contain meta data about the connection and about the contents (called payload) of the body.
The Header has attributes in a key/value form, e.g. the “content type” attribute indicates the type of content in the body (for example image, video, XML, JSON, text, audio).
The Header also contains the “Verb” attribute which indicates what the server has to do.
A standard that defines how to request the server to do something called REST (Representational State Transfer) defines that there is a Resource that changes states i.e. it is created, completely changes, partially changes, deleted, retrieved, etc…
for example :
verb = GET is the way to ask the server to retrieve the
resource back to the client.
verb = POST is the way to ask the server to create a new
verb = PUT is the way to ask the server to replace all current
representations of the resource.
verb = PATCH is the way to ask the server to apply partial
modifications to a resource.
verb = DELETE is the way to ask the server to delete the
More on the HTTP protocol will be posted soon…