I thought that the only way to intercept a request is to use a proxy, but fiddler somehow can intercept HTTP requests and responses without configuring anything on any browsers.
What's going on under the hood ?
And do you know any library to do that ? (In any languages)
To intercept HTTP requests, use the webRequest API. This API enables you to add listeners for various stages of making an HTTP request. In the listeners, you can: Get access to request headers and bodies and response headers.
The Postman app has a built-in proxy that can capture HTTP and HTTPS traffic. Here's how it works: The Postman app listens for any calls made by a client app or device using the proxy. The Postman proxy captures the request and forwards it to the server.
Right-click on a request, and the option should show up in the contextual menu. Send the resulting trace log file to support.
Launch Fiddler exe and it will start capturing HTTP traffic (For HTTPS URL see next section). Run fiddler to start capturing web requests/responses made by various client applications on your system (e.g. Curl, Chrome, Internet Explorer). To start/stop capture go to File > Check/Uncheck [Capture Traffic] option.
Fiddler is a proxy, written in C# and wrapping basic sockets.
It registers with WinINET using the appropriate API call while running, and detaches in the same way. Most browsers automatically detect the WinINET proxy setting and use it. Firefox does not, which is why current versions of Fiddler install a Firefox addon.
-EricLaw [MSFT]
Fiddler actually does use a proxy. I believe the installer automatically configures IE to use Fiddler's proxy. You can also configure other browsers to go through the same proxy, so Fiddler will profile their network traffic too.
More info here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With