Millions of members get involved Java community to make Java strong and change the world
Fiddler is a free and open-source packet analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education. Fiddler captures HTTP and HTTPS traffic data between the browser and the server. This data is helpful to troubleshoot HTTP errors, java script errors, and performance issues related to browser page rendering, this article is a step by step tutorial to guide you how to use Fiddler and how to capture HTTP Traffic.
Fiddler sits between the http client and http server listening on a port for traffic. As the finger in below, it enables a proxy between two layers to intercept the traffic, the request being taken does not proceed to server directly, instead, it goes Fiddler proxy bridge, Fiddler records the incoming and outgoing data and then forward to server again.
Fiddler is a Windows Forms application, available for Windows XP and later, go to download page http://www.fiddler2.com/fiddler2/, there have two versions fiddler2 and fiddler4 available, fiddler2 was written in .Net 2, fiddler4 was higher, please choose either the one to download.
After downloading, double click the exe file and agree to the installing license, follow the step-by-step wizard to complete the installation, during installing, it may ask you close all browsers.
Lunch the shortcut of Fiddler from from Start > All Program, you will see the below main Fiddler UI, when starting Fiddler, it will automatically check the latest version against the Fiddler server and ask you upgrade if there have new version enviable.
Use Internet Explorer or Mozilla FireFox, open a web page to make a request via the explorer, we will instantly see a list of the web requests in the web sessions panel. While you visit more web pages, the list will continue to quickly grow.
The web sessions show all HTTP and HTTPS sessions which were captured by Fiddler, the messages include certain key information:
It’s an overall summary list about what happened without much details. It’s very useful, having the data, we can easily to monitor the HTTP errors, all requests sent to server and what’s being status.
when you double click on a HTTP session, the Inspectors tab from right hand side of the screen will be displayed, it visualize content of captured requests and responses in meaningful ways. In the top half of the right hand side is the request what was sent to server, there have multiple tabs of view where show format message and data(Headers, Text View, web forms, HexView, Auth, Cookies, Raw, JSON and XML). The first one is header, it logged cache, Client, Cookies/Login, Miscellaneous and Transport, these infos are particular helpful to troubleshoot.
The bottom half is response, this is the entire response being sent back to the client browser, it may possible be HTML page, image, JSON string, Cascading Style Sheet (CSS) and other resources, we can click textview, syntaxview, Imageview and other clickable tab to view it in different format, the below example demos we syntax view the html source page of this site.
In this tutorial we saw some of the basic features and examples of Fiddler, Fiddler is a very good debug tool. You may take a try if you have not used it.