在FiddlerScript中将请求转换为字符串

时间:2021-11-17 14:47:41

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.

我正在使用Fiddler4(不确定这是否相关)。我正在尝试添加一项功能,让我可以在每次请求之间延迟一定次数重新发送请求。一切似乎都很好,但我似乎无法将oSession.oRequest转换为字符串,换句话说,从Fiddler提供的会话对象中获取HTTP请求字符串(标题和正文)。文档无益。

1 个解决方案

#1


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

要获取HTTP请求标头,请使用oSession.RequestHeaders.ToString()。

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

要获取请求正文,您可以使用oSession.GetRequestBodyAsString()。

#1


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

要获取HTTP请求标头,请使用oSession.RequestHeaders.ToString()。

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

要获取请求正文,您可以使用oSession.GetRequestBodyAsString()。