Search code examples
fiddlerjscript.net

Convert a request to string in FiddlerScript


I'm using Fiddler4 (not sure if that is relevant). I'm trying to add a feature that lets me resend requests a certain number of times with a delay between each request. Everything seems to be fine but I can't seem to convert oSession.oRequest into a string, or in other words, get the HTTP request string (headers and body) from Fiddler's provided session object. Documentation has been unhelpful.


Solution

  • To get the HTTP request header use oSession.RequestHeaders.ToString().

    To get the request body you can use oSession.GetRequestBodyAsString().