ASSIGNMENT Networking
ASSIGNMENT Networking
images, sound, video and other multimedia files over the web. As soon as a user opens their web
browser, they are indirectly using HTTP. HTTP is an application protocol that runs on top of the
TCP/IP suite of protocols, which forms the foundation of the internet. Belshe, M.; Peon, R.;
Thomson, M. (2013)
Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML
files, image files, query results, etc.) on the World Wide Web. The default port is TCP 80, but
other ports can be used as well. It provides a standardized way for computers to communicate
with each other. HTTP specification specifies how clients' request data will be constructed and
sent to the server, and how the servers respond to these requests.
Through the HTTP protocol, resources are exchanged between client devices and servers over
the internet. Client devices send requests to servers for the resources needed to load a web page;
the servers send responses back to the client to fulfill the requests. Requests and responses share
sub-documents such as data on images, text, text layouts, etc. which are pieced together by a
client web browser to display the full web page file. Jacobs, Ian (2004).
In addition to the web page files it can serve, a web server contains an HTTP daemon, a program
that waits for HTTP requests and handles them when they arrive. A web browser is an HTTP
client that sends requests to servers. When the browser user enters file requests by either
"opening" a web file by typing in a URL or clicking on a hypertext link, the browser builds an
HTTP request and sends it to the Internet Protocol address (IP address) indicated by the URL.
The HTTP daemon in the destination server receives the request and sends back the requested
file or files associated with the request.
To expand on
this example, a user wants to visit TechTarget.com. The user types in the web address and the
computer sends a "GET" request to a server that hosts that address. That GET request is sent
using HTTP and tells the Tech Target server that the user is looking for the HTML (Hypertext
Markup Language) code used to structure and give the login page its look and feel.
The text of that login page is included in the HTML response, but other parts of the page
particularly its images and videos are requested by separate HTTP requests and responses. The
more requests that are made for example, to call a page that has numerous images the longer it
will take the server to respond to those requests and for the user's system to load the page.
When these request/response pairs are being sent, they use TCP/IP to reduce and transport
information in small packets of binary sequences of ones and zeros. These packets are physically
sent through electric wires, fiber optic cables and wireless networks. Jacobs, Ian (2004).
The requests and responses that servers and clients use to share data with each other consist of
ASCII code. Requests state what information the client is seeking from the server; responses
contain code that the client browser will translate into a web page. Jacobs, Ian (2004).
Client-Server Interaction: In an HTTP interaction, there are two parties: the client (e.g., a web
browser) and the server (e.g., a web server). The client initiates communication by sending an
HTTP request to the server. The server responds with an HTTP response containing the
requested information.
HTTP Request: The HTTP request is a message sent by the client to request a specific resource
or action on the server. It consists of the following components: Request Method: Indicates the
desired action, such as GET, POST, PUT, DELETE, etc. Nottingham, M.; Reschke, J. (2022).
URL (Uniform Resource Locator): Specifies the address and path to the resource on the server.
Headers: Contains additional information about the request, such as the client's user agent,
content type, and more. Body (optional): Contains data, such as form data or a request payload, if
needed.
Client Server
| |
| Request |
|------------------------>|
| |
| Response |
|<------------------------|
| |
Client: The HTTP client sends a request to the server in the form of a request method, URI, and
protocol version, followed by a MIME-like message containing request modifiers, client
information, and possible body content over a TCP/IP connection.
Server: The HTTP server responds with a status line, including the message's protocol version
and a success or error code, followed by a MIME-like message containing server information,
entity Meta information, and possible entity-body content. Nottingham, M.; Reschke, J. (2022).
HTTP Request: The HTTP request is a message sent by the client to request a specific resource
or action on the server. It consists of the following components: Request Method: Indicates the
desired action, such as GET, POST, PUT, DELETE, etc. URL (Uniform Resource Locator):
Specifies the address and path to the resource on the server. Headers: Contains additional
information about the request, such as the client's user agent, content type, and more. Body
(optional): Contains data, such as form data or a request payload, if needed
HTTP Response: The HTTP response is a message sent by the server to fulfill the client's
request. It consists of the following components: Status Code, A three-digit number indicating
the result of the request (e.g., 200 for OK, 404 for Not Found, 500 for Internal Server Error),
Headers: Contains additional information about the response, such as the content type, server
information, and more, Body (optional): Contains the requested resource or data. Stephan, E.
(2014).
Data Exchange: The client and server exchange data in the form of HTTP requests and
responses. The client's request specifies what it needs, and the server's response provides the
requested information, which can be HTML pages, images, JSON data, or any other type of
content.
Stateless Protocol: HTTP is stateless, which means each request-response pair is independent,
and the server does not maintain a memory of previous interactions. To manage session state,
cookies or other mechanisms are often used. Stephan, E. (2014).
In summary, HTTP is a protocol that allows clients and servers to communicate by sending
requests and receiving responses. These requests and responses contain essential components
like methods, URLs, headers, and optional message bodies to facilitate data exchange between
web clients and servers.
Reference
Belshe, M.; Peon, R.; Thomson, M. (2013) "Hypertext Transfer Protocol Version 2: Use of TLS
Features". Archived from the original.
Cimpanu, Catalin (2019). "Cloudflare, Google Chrome, and Firefox add HTTP/3 support".
ZDNet.
Fielding, R.; Nottingham, M.; Reschke, J. (2022). HTTP Semantics: IETF. Doi:
10.17487/RFC9110. RFC 9110.
Friedl, S.; Popov, A.; Langley. (2014). Application-Layer Protocol Negotiation Extension.
IETF.10.17487.
Jacobs, Ian (2004). "URIs, Addressability, and the use of HTTP GET and POST": Technical
Architecture Group finding. W3C. Retrieved 26 September 2010.