Вы находитесь на странице: 1из 4

Ibalio, Vincent

Pangan, Rico
Amayag, Ivy
Paguio, Tanya
Romero, Angelique
Zamora, Vinalyn

HTTP: Basic Functionalities

The Hypertext Transfer Protocol (HTTP) enables to communicate between a client and a server.

HTTP MESSAGE – is how data is exchanged between a server and a client

 The Client sends REQUEST to the server


 The Server sends RESPONSES

2 types of HTTP Message:


1. REQUEST
- A request is a message sent by the client to begin a certain action to the server.

1.1 Request- Line


- Request line begins with a method token, followed by Request-URI and the HTTP
Protocol
Ex. GET/background.png HTTP/1.0

1.2 Headers
- It allows the client to pass additional information about the request to the server

A. General Headers – Work on both the request and response but it has no relation to the
data transmitted in the body

B. Request Headers – Contains information of the resource

C. Entity Headers – Contains information of the body of the entity

Figure 1
2. RESPONSE
- It is a reply of the server to the client. The client will send a request message
with the following format, server will now receive and interpret the message
and respond to it with the same message format.
2.1 Status line
- The status line is the first line in the response message. It consist of three parts:
1. HTTP Protocol Version
2. Status Code
3. Reason Phrase

Figure 2

 As shown in Figure 2, The status line has the following information:


o HTTP Protocol version as (HTTP/1.1)
o Status code as 200
o Status Message as OK

2.2 Response Header Fields


- HTTP headers allow the client and the server to pass additional information with the
request or the response. An HTTP header consists of its case-insensitive name
followed by a colon ':', then by its value (without line breaks). Leading white space
before the value is ignored.

Headers can be grouped according to their context:

 General header: It applies for both requests and responses but with no relation to
the data eventually transmitted in the body.
 Request header: It gives additional information about the server which doesn’t fit in
the status line.
 Response header: It applies only for response messages.
 Entity header: Contains information about the body of the entity.

Figure 3

METHODS
Methods Description
GET It is used to retrieve information from the
given server.
HEAD Same as GET but it only transfers the status
line and the header section
POST It is used to send data to the server
PUT It replaces all the current representation to
the specified source
DELETE It removes all the current representations to
the specified source
CONNECT It establishes a tunnel to the server identified
by the resource
OPTIONS It is used to describe the communication
options for the resource
TRACE It performs a message loop-back test along
the path of the target resource
PATCH It is used to apply partial modifications to a
resource
Resources:
IBM Knowledge Center. (n.d.). Retrieved from
https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.5.0/reference/wui/eyuadbb.ht
ml

HTTP Response. (n.d.). Retrieved from http://toolsqa.com/client-server/http-response/

HTTP headers. (n.d.). Retrieved from https://developer.mozilla.org/en-


US/docs/Web/HTTP/Headers

MDN Web Docs (2018) HTTP Request Method Retrieved from


https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

T. (n.d.). HTTP Header Fields. Retrieved from


https://www.tutorialspoint.com/http/http_header_fields.htm

Tutorials Point (n.d.) HTTP – Request Retrieved from


https://www.tutorialspoint.com/http/http_requests.htm

w3 (n.d.) Protocols Retrieved from


https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html

w3schools (n.d.) HTTP Request Method Retrieved from


https://www.w3schools.com/tags/ref_httpmethods.asp

Вам также может понравиться