我正在尝试使用 Fiddler 修改“multipart/form-data”POST 请求中的“Content-Disposition”值,该请求由网页的 javascript 自动生成,并在文件上传时附上图像。
但是,我找不到解决方法:当我尝试简单地替换“Content-Disposition”时,提琴手似乎将整个内容转换为字符串,替换了 Content-Disposition 字符串并转换回字节,这似乎破坏了附件图片。
我尝试使用的几个代码示例:
oSession.utilReplaceInRequest("string1","string2")
var strBody=oSession.GetRequestBodyAsString();
strBody=strBody.replace("string1","string2");
oSession.utilSetRequestBody(strBody);
虽然这些成功地将 string1 替换为 string2,但附加的图像不再有效。
有什么方法可以做到这一点?