HTTP (Hypertext Transfer Protocol) | Computer Networks - Computer Science Engineering (CSE) PDF Download

HTTP (Hypertext Transfer Protocol)
The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. The protocol transfer all data in the form of plain text, hypertext, audio, video, and so on. However it is called the hypertext transfer protocol because its efficiency allows its use in a hypertext environment where there are rapid jumps from one document to another.

HTTP functions like a combination of FTP and SMTP. It is similar to FTP because it transfers files and uses the services of TCP. However, it is much simpler than FTP because it uses only data are transferred between the client and the server.

HTTP is like SMTP because the data transferred between the client and server look like SMTP messages. In addition, the format of the messages is controlled by MIME-like headers.

However, HTTP differs from SMTP in the way the messages are sent from the client to the server and from the server to the client. Unlike SMTP, the HTTP messages are not destined to be read by humans; they are read and interpreted by the HTTP server and HTTP client (browser). SMTP messages are stored and forwarded, but HTTP messages are delivered immediately.

The idea of HTTP is very simple. A client sends a request, which looks like mail, to the server. The server sends the response, which looks like a mail reply, to the client. The request and response messages carry data in the form of a letter with MIME-like format.

The commands from the client to the server are embedded in a letter like request message. The contents of the requested file or other information are embedded in a letter like response message.

HTTP Transaction
Figure illustrates the HTTP transaction between the client and server. The client initializes the transaction by sending a request message. The server replies by sending a response.

Messages
There are two general types of HTTP messages, shown in figure request and response. Both message types follow almost the same format.

Request Messages
A request message consists of a request line, headers, and sometimes a body.

Response Message
A response message consists of a status line, headers, and sometimes a body.

Uniform Resource Locator (URL)
A client that wants to access a document needs an address. To facilitate the access of documents distributed throughout the world, HTTP uses the concept of locators. The uniform resource locator (URL) is a standard for specifying any kind of information on the Internet.

The URL defines four things:

  • Method
  • Host
  • computer Port
  • Path

The method is the protocol used to retrieve the document, for example HTTP. The host is the computer where the information is located, although the name can be an alias.

Web pages are usually stored in computers, and computers are given alias names that usually begin with the characters “www”. This is not mandatory, however, as the host can be any name given to the computer that hosts the web page.

The URL optionally can contain the port number of the server. If the port is included, it should be inserted between the host and the path, and it should be separated from the host by a colon.

Path is the pathname of the file where the information is located. Note that the path can itself contain slashes that, in the UNIX operating system, separate the directories from subdirectories and files.

The document HTTP (Hypertext Transfer Protocol) | Computer Networks - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Computer Networks.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
21 videos|107 docs|66 tests

Up next

FAQs on HTTP (Hypertext Transfer Protocol) - Computer Networks - Computer Science Engineering (CSE)

1. What is HTTP and why is it important in web browsing?
Ans. HTTP, or Hypertext Transfer Protocol, is the protocol used for transmitting data over the internet. It allows for communication between web servers and web browsers, enabling the retrieval and display of web pages. HTTP is important in web browsing because it defines how messages are formatted and transmitted, ensuring the seamless transfer of information between clients and servers.
2. How does HTTP differ from HTTPS?
Ans. The main difference between HTTP and HTTPS is the added layer of security provided by HTTPS. HTTPS, or Hypertext Transfer Protocol Secure, uses SSL/TLS encryption to protect data transmitted between the web server and the browser. This encryption ensures that sensitive information, such as passwords or credit card details, cannot be intercepted by hackers. In contrast, HTTP does not offer this level of security, making it more vulnerable to attacks.
3. What are HTTP status codes and what do they indicate?
Ans. HTTP status codes are three-digit numbers that indicate the status of a requested web page or resource. They provide information on whether the request was successful, encountered an error, or requires further action. For example, a status code of 200 signifies a successful request, while a code of 404 indicates that the requested resource was not found. These status codes are crucial for troubleshooting and understanding the outcome of a web request.
4. Can HTTP be used for more than just web browsing?
Ans. Yes, HTTP can be used for more than just web browsing. While it is primarily associated with retrieving web pages, HTTP can also be used to transfer data between various applications and services. This allows for the integration of different systems and the exchange of information in a standardized manner. HTTP is widely used in web services, APIs, and other distributed systems that require the exchange of data over the internet.
5. What is the difference between HTTP and FTP?
Ans. The main difference between HTTP and FTP (File Transfer Protocol) lies in their primary purposes. HTTP is primarily used for browsing the World Wide Web and transferring web content, such as HTML documents, images, and videos. On the other hand, FTP is designed specifically for transferring files between a client and a server. It allows users to upload, download, and manage files on remote servers. While both protocols facilitate data transfer, they serve different purposes and operate on different ports.
21 videos|107 docs|66 tests
Download as PDF

Up next

Explore Courses for Computer Science Engineering (CSE) exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

ppt

,

HTTP (Hypertext Transfer Protocol) | Computer Networks - Computer Science Engineering (CSE)

,

Sample Paper

,

Important questions

,

Viva Questions

,

Extra Questions

,

Exam

,

mock tests for examination

,

past year papers

,

HTTP (Hypertext Transfer Protocol) | Computer Networks - Computer Science Engineering (CSE)

,

Free

,

video lectures

,

pdf

,

HTTP (Hypertext Transfer Protocol) | Computer Networks - Computer Science Engineering (CSE)

,

Previous Year Questions with Solutions

,

MCQs

,

Semester Notes

,

practice quizzes

,

shortcuts and tricks

,

Summary

,

study material

,

Objective type Questions

;