This Fiddler extension generates C#, VB, or Python code to duplicate a web request. You simply drag one or more Fiddler sessions into the “Code” tab or use the ‘r2c <partialURL1> <partialURL2> …’ QuickExec command and the extension will produce appropriate code that you can copy and paste into your program that reproduces those requests. You can also run the code directly from the extension tab.
Download: Fiddler Extension – Request To Code (version 188.8.131.52, 75.39 kB zipped)
This can be useful for a number of purposes:
- Submit form data programmatically – fill out a form online once with Fiddler running, then use the extension to copy and paste the request code into your own program. You could then make this request as many times and as often as you need to.
- Easily codify web requests – request resources like RSS feeds, images, XML, etc… from your program. Further modify the web requests to your needs.
- Programmatically test differing header values – you can easily modify the request functions so that you can try varying values for various HTTP headers. This way you can test your web site or web service against these various headers.
- Run code directly from the Code tab – you can use the “Run Code” button to run the code currently in the Code tab.
- Automatically generate code in conjunction with FiddlerCore – Reference both FiddlerCore and FiddlerCoreRequestToCode in your project and you can generate code and do whatever you want to do with it. For instance, you could write a file for each session you observe that contains the Request To Code code in it. See an example and learn more…
- Copy FiddlerRequestToCode.dll from the .zip file into your Fiddler2\Scripts folder.
- You’ll need to restart Fiddler if it’s already running.