HTTP Response

Created By vladimir

The information provided by the server in response to the client's request is known as the HTTP Response. Read this article to learn everything about it.

What is the HTTP Response

After submitting the HTTP Request to the web server, the web application will return an HTTP Response that usually contains some headers and a body of data.

How does an HTTP Response look like

A basic HTTP Response from a GET Request:

HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
Content-Length: 88
Content-Type: text/html
Connection: Closed
<html>
   <body>
      <h1>Hello, World!</h1>
   </body>
</html>

The first line:

  • HTTP protocol version - in this case it's HTTP/1.1
  • HTTP status code - 200
  • Reason text - OK

A status code is included in every HTTP response. This status code is also a three-digit integer value. The response's class is represented by the first digit. Furthermore, the last two digits have no categorical value. The first digit of the status code can have one of five different values. The status code in our example is "200".

A short textual description of the status code is given/provided by the reason phrase. It's like a status message that matches the status code. The reason phrase is "OK" in our example.

Headers:

A response header is similar to a request header in that it contains additional response information. A response may also have 0 or more headers, but zero response headers are extremely unlikely. In addition, the response headers appear after the status line but before the response body.

Response Body:

The resource data requested by the client is contained in the response body. In our example, we asked for book data, and the response body contains a list of all the books in the database, along with their descriptions.

Theoretical Children Concepts

A theoretical concept proposes a solution to a theoretical problem
add concept

There are no concepts yet. Help the community by adding one yourself!

Resources

Articles, tutorials, courses or books

Django: Request/Response Cycle

March 23, 2019 by Sarthak Kumar Article

1 Reviews
To get a better understanding of the Django framework, we need to know how requests are made and how the end result is delivered to the user. In this article we go over the various stages of requests and how it's processed at each stage to form the final server response. edited

How the Internet Works for Developers - Overview & Frontend

Jan. 2, 2014 by LearnCode Video

No reviews yet. Contribute
A 15 minute video about how a browser gets and displays a web page. It's an overview for understanding the process.

HTTP response status codes

Jan. 4, 2022 by mozilla.org Article

No reviews yet. Contribute
When a server receives an http request from a client, it responds with a status code. The http status code is a standardized way of specifying what happened to the request on the server.

A Minimalist End-to-End Scrapy Tutorial (Part I)

Nov. 5, 2019 by Harry Wang Series

No reviews yet. Contribute
A 5 part tutorial series about how to build a complete web crawler using scrapy. From starting the project using scrapy startproject command to saving the scraped items into the database using SQLAlchemy via pipelines. Parts 4 and 5 take it to the other level where the crawler is deployed to scrapinghub and selenium is implemented for scraping dynamic pages.