Can I use FiddlerCore parsing and http request management functionality without enabling it as a proxy?

296 views Asked by At

FiddlerCore seems to have a ton of functionality around managing http requests including parsing headers, parsing and decoding body content, searching for content within a request, etc. Additionally there's the functionality to replay captured requests.

I'd like to use these features on requests that my web application receives directly, for example via an ASP.NET MVC or Web API controller.

In this scenario, I am am natively capturing the request, so I don't need or want FiddlerCore's proxy functionality. I just want to use the bits of FiddlerCore that manage and manipulate requests.

Can I use the above functionality of FiddlerCore and not enable a proxy?

1

There are 1 answers

4
EricLaw On

It sounds like you're asking "How do I run FiddlerCore as a reverse proxy?"

  1. Move the target service to a different port (e.g. 81 instead of 80)
  2. Call FiddlerApplication.Startup with the original service port (e.g. 80)
  3. In your FiddlerCore application's BeforeRequest handler, rewrite the port of inbound requests to point to the target port (e.g. 81).