【问题标题】:How to have Fiddler\ other application automatically intercept and modify HTTP requests parameters?如何让 Fiddler\其他应用程序自动拦截和修改 HTTP 请求参数?
【发布时间】:2021-12-25 23:30:19
【问题描述】:

我在一个我不拥有\编码的网站上工作。现在,我需要更改从该网站发送到服务器的请求的参数之一。

示例: 来自:

https://google.com/search?count=20

收件人:

https://google.com/search?count=40

我尝试使用 Fiddler 更改参数并成功,但我希望对从我的电脑发送的每个请求自动完成。

我还尝试了Requestly,这是一个能够修改参数的 chrome 扩展,但它也会与响应标头混淆。 而不是发送:

Accept-Encoding: gzip, deflate, br
Accept-Language: he-IL,he;q=0.9,en-US;q=0.8,en;q=0.7
Cache-Control: no-cache
Connection: keep-alive
Content-Type: application/json
sec-ch-ua: "Google Chrome";v="95", "Chromium";v="95", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

作为标头,它只发送:

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

这里有什么建议吗?

【问题讨论】:

    标签: javascript http google-chrome-extension url-rewriting


    【解决方案1】:

    如果您配置了a QueryParams RuleRequestly 不会修改响应标头

    您可以像这样创建修改 QueryParams 规则

    根据the documentation

    • 如果参数不存在,规则将添加参数q,其值为40
    • 如果 URL 中已存在参数,规则会将参数 q 的值更改为 40

    对于 Requestly 相关的问题,我建议使用 QnA 部分 - https://github.com/requestly/requestly/discussions/categories/q-a

    【讨论】:

      猜你喜欢
      • 2012-08-21
      • 1970-01-01
      • 1970-01-01
      • 2019-02-19
      • 1970-01-01
      • 1970-01-01
      • 2014-09-16
      • 2019-12-21
      • 2014-03-25
      相关资源
      最近更新 更多