Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

e- Robotics

yantra_logo
Competition
2020-21

   eYRC 2020-21: Vargi Bots (VB)

HTTP Protocol
HTTP stands for Hypertext Transfer Protocol.
This protocol typically involves a client machine making a request to a server, which then sends
a response message.
Through HTTP you can transfer HTML and create simple user interfaces, it can be implemented
using JSON (Java Script Object Notation) to make attractive web pages and it is available in most
of the browsers. Let us look into the flow of messages that takes place in HTTP

1. HTTP Request : An HTTP request is an action to be performed on a resource identified by a


given Request-URL. Request methods are case-sensitive, and should always be noted in upper
case. The format of Request message is as follows

Request Line is the first line of headers. The syntax of Request line if request-method-name
request-URI HTTP-version

1. The request-method-name in the syntax is the HTTP Method which defines what
operation client wants to perform. Mostly client wants to fetch data which is done using
 GET method or submitting data into the web server which is possible using POST method.
These two are the most common HTTP Methods which are used to know more about

method refer following link https://rapidapi.com/blog/api-glossary/http-request-methods/
2. The request-URI is Uniform Resource Identifier which identifies the resource which is
requested.
3. HTTP-version is the version used by HTTP. Currently there are two versions in use those
are HTTP/1.0 and HTTP/1.1.

Request Header is an HTTP header that can be used in an HTTP request, and that doesn't
relate to the content of the message. Request headers, like Accept, Accept-, or If- allow to
perform conditional requests; others like Cookie, User-Agent, or Referer precise the context so
that the server can tailor the answer.

2. HTTP Response : Each request message sent by an HTTP client to a server prompts the server
to send back a response message. Actually, in certain cases the server may in fact send two
responses, a preliminary response followed by the real one. Usually though, one request yields
one response, which indicates the results of the server's processing of the request, and often
also carries an entity (file or resource) in the message body. The message format of Response
is similar to request as shown below

Status Line : It is the first line in the format, followed by optional response headers. The syntax
of status line is HTTP-version status-code reason-phrase

1. HTTP-version: The HTTP version used in this session. Either HTTP/1.0 and HTTP/1.1.
2. status-code: It is 3-digit number generated by the server to reflect the outcome of the
request. Common status code and reason phrase are "200 OK", "404 Not Found", "403
Forbidden", "500 Internal Server Error".
3. reason-phrase: It gives a short explanation to the status code.

Response Header is HTTP header that can be used in an HTTP response and that doesn't relate
to the content of the message. Response headers, like Age, Location or Server are used to give
a more detailed context of the response.

 

You might also like