如何在到达服务器之前更改帖子正文? [英] how do i change the post body before it reaches the server?

查看:71
本文介绍了如何在到达服务器之前更改帖子正文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试编写我的第一个小提琴手脚本.

Trying to code my first fiddler script.

我如何在帖子到达服务器之前对其进行更改?

How do i change the post body before it reaches the server?

我的意思是,我填写表格,单击提交",然后暂停以更改所需内容,最后将其发送到服务器.

I mean, i fill the form, click submit, then pause to change what i want, and, finally, send to server.

我发现此脚本可以更改响应,但是我想更改请求.

I found this script to change the response, but i want to change the request.

if (oSession.HostnameIs("www.bayden.com") && oSession.oResponse.headers.ExistsAndContains("Content-Type","text/html")){
  oSession.utilDecodeResponse();
  oSession.utilReplaceInResponse('<b>','<u>');
}

推荐答案

尝试一下

if (oSession.uriContains("/myposturl")) {
   if (oSession.HTTPMethodIs("POST")){
      oSession["x-breakrequest"]="pause";
   }
}

OnBeforeRequest

OnBeforeRequest

这篇关于如何在到达服务器之前更改帖子正文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆