Monitor visual studio http request with fiddler

16,210

Solution 1

By simply adding fiddler to the url

http://localhost.fiddler:8081/

Traffic is routed through fiddler and therefore being displayed on fiddler.

P.S. As credit to: https://stackoverflow.com/a/13358261/805138

Solution 2

Check out this link - http://fiddler2.com/documentation/Configure-Fiddler/Tasks/MonitorLocalTraffic. Instead of localhost, use the machine name or the IPV4/6 adapter.

Share:
16,210
Tomer
Author by

Tomer

Updated on July 23, 2022

Comments

  • Tomer
    Tomer almost 2 years

    I am trying to monitor the following request from VS2012 on fiddler but can't:

            var client = new HttpClient();
            client.BaseAddress = new Uri("http://localhost:8081/");
            var product = new Product() { Description = "blabla", CatalogName = "myName"};
            MediaTypeFormatter jsonFormatter = new JsonMediaTypeFormatter();
            // Use the JSON formatter to create the content of the request body.
            HttpContent content = new ObjectContent<Product>(product, jsonFormatter);
            // Send the request.
            HttpResponseMessage resp = client.PostAsync(@"odata/Products/", content).Result;
            var result = resp.Content.ReadAsStringAsync().Result;
    

    I've read about 2000 manual and feeds regards, but couldn't figure it out.
    Any clue?

  • Tomer
    Tomer over 10 years
    Thanks! But as mentioned I've ran into alllot of blogs and came out short on this specific method. The weird thing is that using both ipv4.fiddler and 127.0.0.1 Does lead to "localhost" but when adding port number, such as: ipv4.fiddler:8081 doesn't lead to same as localhost:8081 Really frustrating...
  • EricLaw
    EricLaw over 10 years
    ipv4.fiddler is converted to 127.0.0.1. ipv6.fiddler is converted to [::1]. localhost.fiddler is converted to localhost.