Showing posts with label fiddler. Show all posts
Showing posts with label fiddler. Show all posts

Friday, March 1, 2013

HTTP Request Headers Testing

This is a trick I’ve been using for a while, but I wanted to share.

Sometimes third party software requests your Web Pages/Services and pass data via the HTTP Request Headers.

If you want to simulate these requests you can do so with Fiddler. Fiddler acts as a “man in the middle” for all the requests coming from your browser. Therefore, it has the ability to alter your HTTP requests before they are passed along to the appropriate destination.

Here is how you add a header to your browser requests.

Launch Fiddler and select Rules > Custom Rules…

Find the function called

static function OnBeforeRequest(oSession: Session)

Within this function you can add items to your request header by assigning key/value combination to the “oSession.oRequest” array.

Here’s an example:

static function OnBeforeRequest(oSession: Session)
{ 
    oSession.oRequest["Custom_Header_Key"] = "Custom Header Value";
}

Now any request from a browser will contain that value. Including localhost requests

2013-03-01_1427

For more information about Custom Rules, I encourage your to visit the Fiddler Script Cookbook

Thursday, February 4, 2010

Because of Fiddler I could not browse the web after a power failure.

I was in the middle of debugging my network traffic with Fiddler when there was a power “hiccup” and my computer rebooted.

When I came back up, I opened an Internet Explorer window and could not reach any web address. I could “ping www.google.com” but when I tried to browse to “www.google.com” IE kept sending me back to “http:///”

I’ve learned recently the fiddler makes strong usage of a local proxy. I stared up fiddler again, and did a clean shutdown of the app. After this I was able to browse the web again.

Interesting experience I thought I would share it.

Now it’s time to get an Uninterrupted Power Supply.