Hypertext Transfer Protocol HTTP is an application protocol, hypertext is basically structured text
that uses logical links between nodes containing text.
And HTTP is the protocol to exchange or transfer hypertext.
So HTP is a stateless protocol that means no information is retained by other sender or receiver, it
functions as a request response protocol in the client server computing model.
A Web browser, for example, may be the client and an application running on a computer that's hosting
a Web site, maybe the server.
The client submitted HTP request message to the server.
The server, which provides resources such as HTML files and other content, returns a message to the
client.
The response contains completion status information about the request and may also contain requested
content in its message body.
So the most used HTTP request is get.
A get request is designed to request server resources.
With this type of request, the parameters are sent to the server inside the euro.
A post request is designed to request server resources as well as a get request, unlike aget request,
parameters are sent to the server inside the body of the request instead of the euro.
Well, you know, it's still possible to send the parameters inside the URL, but if you use a post
request, it's better to send parameters inside the body than inside the URL.
So what's the advantage of sending parameters inside the body instead of the URL?
Almost always the traffic between the server and the client is logged on the server side.
Such log files usually contain the URL.
If you send the parameters in the URL, they are saved as clear text in your log files so anyone who
can see the log files can also see your sensitive parameters, you should use post request to send sensitive
data.
But please note that it's not enough for the privacy of the traffic because any man in the middle who
listens to the network will see the parameters, even though they are inside the body of the request
message.
So you should encrypt your traffic always.
Now, the server, which provides resources such as HTML files and other content, returns a response
message to the client.
The response contains completion status information about the request and may also contain requested
content in its message by.
So every response has a three digit response status code, such as 200, OK, 302 found, et cetera.