What Is HTTP (Hyper Text Transfer protocol)

by

Last updated on Dec 15, 2022
Unit 7 : HTTP (Hyper Text Transfer protocol)

What is HTTP?

HTTP is the foundation of the World Wide Web and is used to load web pages through hypertext links. HTTP is an application layer protocol designed to transfer data between networked devices. It operates atop other layers of the network protocol stack. A typical HTTP flow consists of a client sending a request to a server, which then sends a response message.

HTTP

  • HTTP stands for HyperText Transfer Protocol.
  • It is a protocol used to access the data on the World Wide Web (www).
  • The HTTP protocol can be used to transfer data in various formats, including plain text, hypertext, audio, and video.
  • HyperText Transfer Protocol is the name of this protocol because it works well and lets us move quickly from one document to another in a hypertext environment.
  • HTTP is like FTP in that it also moves files from one server to another. But HTTP is easier to use than FTP because it only needs one connection (no control connection) to send files.

Features of HTTP

  • Connectionless protocol: HTTP is a protocol with no connections. The HTTP client sends a request to the server and then waits for a response. When the request gets to the server, the server processes it and sends the response back to the HTTP client. The client then closes the connection. The connection between the client and the server only lasts as long as the request and response.
  • Media independent: The HTTP protocol can send data over any kind of medium, as long as both the client and the server know how to deal with the data. In the MIME-type header, both the client and the server must say what kind of content is being sent.
  • Stateless: HTTP is a stateless protocol, which means that the client and server only know each other during the current request. Because of how the protocol works, neither the client nor the server keeps the information between requests for web pages.

Http Requests and Responses

A message is how the client and server talk to each other. HTTP messages are requests or responses. The client sends an HTTP request to the server, and the server sends an HTTP response back to the client.

HTTP requests. This is when a client device, like an internet browser, asks the server for the information it needs to load the website. The request gives the server the information it needs to know about the client device so it can make the response fit it. Each HTTP request has data that is encoded. This data includes things like:

  • The specific version of HTTP followed: HTTP and HTTP/2 are the two versions.
  • A URL: This points to the resource on the web.
  • An HTTP method: This shows what kind of action the request wants the server to take as a response.
  • HTTP request headers: This information includes the type of browser being used and the type of information being requested from the server. Cookies, which display information that the server handling the request has already sent, may also be included.
  • An HTTP body: This is optional information that the server requires from the request, such as user forms, username/password logins, brief responses, and file uploads.

HTTP responses: The HTTP response message is the data received by a The HTTP response message contains the data a client device receives from a web server. The response, as its name suggests, is the server’s reply to an HTTP request. The information contained in an HTTP response is customised based on the request’s context. Typical HTTP responses include the following data:

  • HTTP status code: which communicates the request’s status to the client device. Responses could indicate success, an informative response, a redirect, or server or client-side errors.
  • HTTP response headers: which transmit data regarding the server and requested resources.
  • An HTTP body (optional): If a request is successful, this contains the requested data as HTML code, which is translated by the client browser into a web page.

Uniform Resource Locator (URL)

About URL

Uniform Resource Locator

  • If a client wants to access a document on the Internet, it needs an address. The HTTP uses the idea of a “Uniform Resource Locator” (URL) to make document access easier (URL).
  • The Uniform Resource Locator (URL) is a standard way to find any kind of information on the Internet.
  • There are four parts to an URL: the method, the host computer, the port, and the path.
  • Method: The protocol that is used to get the document from a server is the method. HTTP is a good example.
  • Host: The computer where the information is stored is called the host, and that computer is given a different name. Most web pages are stored on computers, which are given a name that starts with “www” to hide their true identity. This field isn’t a must-have.
  • Port: The server’s port number can also be in the URL, but this is not required. If the port number is included, it should go between the host and the path, and a colon should separate it from the host.
  • Path: Path is the pathname of the file containing the information. The path itself is separated into directories, subdirectories, and files by forward slashes.

How useful was this post?

5 star mean very useful & 1 star means not useful at all.

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

CN

Unit 1: Introduction

Unit 2: Networks Architecture Models

Unit 3: Physical Layer

Unit 4: Data Link Mac Layer

Unit 5: Network Layer

Unit 6: Transport and Application Layer

Unit 7: Protocols