Click Rules > Customize Rules (Ctrl+R) and type this right before the closing curly bracket (})
BindUIButton("Copy cURL")
ContextAction("Copy cURL")
public static function doCopyCurl(arrSess: Session[])
{
var oExportOptions = FiddlerObject.createDictionary();
// If you'd prefer to save to a file, set the Filename instead
//oExportOptions.Add("Filename", "C:\\users\\lawrence\\desktop\\out1.bat");
//oExportOptions.Add("Filename", "C:\\users\\lawrence\\desktop\\out1.bat");
oExportOptions.Add("ExportToString", "true");
FiddlerApplication.DoExport("cURL Script", arrSess, oExportOptions, null);
var sOutput: String = oExportOptions["OutputAsString"];
Utilities.CopyToClipboard(sOutput);
FiddlerApplication.UI.SetStatusText("Copied Sessions as HAR");
}
No comments:
Post a Comment