Converting Composed Fiddler Everywhere Requests to cURL
|Product Version||1.0.0 and above|
|Supported OS||macOS, Linux, Windows|
Many developers, support engineers, and end-users are familiar with the cURL as a fast tool for executing and managing requests. How can I easily convert a request that was generated in the Composer to a cURL script?
Fiddler Everywhere version 4.0.0 and above provides an automated export as Curl script through the Live Traffic list context menu.
To convert a request created in the Composer:
- Create and execute your request in the Composer.
- Open the Live Traffic list and select the generated session from the executed request above.
- Open the context menu by right-clicking the session entry and go to Export > Selected Sessions.
- From the drop-down menu, choose cURL Script and click Next.
- Choose a name and extension for the file. Click Save. By default, the file name is the current date and the extension is BAT.
By default, Fiddler Everywhere saves the outputted cURL script as a BAT file, which is appropriate for Windows usage. Linux and macOS users might want to change the default extension with the proper format for the OS—for example, to
*.sh for the Shell script.
A cURL output generated from Fiddler Everywhere looks similar to the following sample:
curl -k -i --raw -o 0.dat "http://httpbin.org/get?theAnswer=42" -H "User-Agent: Fiddler Everywhere" -H "Host: httpbin.org"
-kflag allows insecure server connections when using SSL. Fiddler Everywhere adds the flag to ensure that the cURL script can be executed even with the Fiddler proxy and its certificate in place.
- Fiddler Everywhere internally uses the
-o <x>.datto generate different DAT files for each selected session.
- Fiddler Everywhere adds the User-Agent header automatically for all requests made with the Composer.
You are free to modify, remove and change the generated flags and parameters as per your technical requirements.