Home > DeveloperSection > Articles > Debugging HTTP Requests and HTTP Response

Debugging HTTP Requests and HTTP Response


ASP.Net ASP.Net 
Ratings:
0 Comment(s)
 1558  View(s)
Rate this:

Debugging HTTP Requests and HTTP Response

Introduction

We day by day interact with many websites during web browsing. To get any web resource using web browser we generally fire http request to server.

As we belong to developers, we should know what we are sending to server from our browser using http request and what we are getting from server as http response.

Here I would like to introduce an easy way by which we can see entire details of Http request and http response.

It is general awareness document.

Client – Server Request/Response diagram

Debugging HTTP Requests and HTTP Response

Objective

Our objective here is to capture following things during Http request and Http response

a)      Request Headers

b)      Getting Cookie information

c)       Request body

d)      Response headers

e)      Response body

Approach

We would like to use IE 9 for this purpose.

 

 

Steps

1)      Open a IE 9 browser

Debugging HTTP Requests and HTTP Response

2)      Press F12

After pressing f12 you will see the screen below.

Debugging HTTP Requests and HTTP Response

3)      Click on Network Tab and then click on Start capturing button (from screen at step 2).

 

4)      After clicking start capturing, Type any URL at address bar. Here I have typed http://c-sharpcorner.com

 

Following screen will appear

Debugging HTTP Requests and HTTP Response


5)      Deeper look of step 4.

Debugging HTTP Requests and HTTP Response

 

Description of Request (Here from above screen we can see following things).

a)      Method type of HTTP request

b)      Status column (Result) with status code.  Here for first line it is 200 means status is success.

c)       Content type of request.

d)      Amount of bytes received

e)      Time taken for request. And so on.

 

6)      Now double click on first selected row. We will get details of selected row. Following screen will display.

 

Debugging HTTP Requests and HTTP Response

Here we can see following details

a)      Request headers

b)      Request body

c)       Response headers

d)      Response body

e)      Cookies and so on.

 

·         Screen for response headers

Debugging HTTP Requests and HTTP Response

 

 

We can see various details of HTTP response from server.

 

 

·         Screen for response body

Debugging HTTP Requests and HTTP Response

  Here we can see the html code which has been sent from server.

·         Screen for cookies

Debugging HTTP Requests and HTTP Response

 

·         Screen for timings

Debugging HTTP Requests and HTTP Response

In this screen we can see the timings between request and response from server.

 

Conclusion

By using IE9 we can debug http request and http response to check the details behind the scene.


Don't want to miss updates? Please click the below button!

Follow MindStick