We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小程序原生http请求不能携带路由信息,那么如何通过代理,修改请求头呢?
通过 whistle 配置代理,修改请求头(通用)
whistle是一个跨平台的抓包与 web debug 工具,使用 whistle,你可以配置代理服务器,修改请求头响应头
// 启动whistle $ w2 start // 停止whistle $ w2 stop // 重启whistle $ w2 restart
启动 whistle
在浏览器访问http://127.0.0.1:8899/
选择Rules,creat 一个自定义配置,比如beta,后面记得勾选上哦!
打开微信开发者工具
重新编译,在浏览器的network界面可以看到请求,证明代理配置成功
选择Values,creat 一个操作值
点击某个请求,打开Inspectors,可以在Request headers中看到多了两个自定义的请求头
The text was updated successfully, but these errors were encountered:
No branches or pull requests
whistle-for-miniprogram(小程序使用代理)
一、背景
小程序原生http请求不能携带路由信息,那么如何通过代理,修改请求头呢?
二、方案
通过 whistle 配置代理,修改请求头(通用)
三、whistle 的优缺点
四、使用whistle
4.1 什么是whistle
whistle是一个跨平台的抓包与 web debug 工具,使用 whistle,你可以配置代理服务器,修改请求头响应头
4.2 whistle 的安装启动
4.3 whistle 配置代理
启动 whistle
在浏览器访问http://127.0.0.1:8899/
选择Rules,creat 一个自定义配置,比如beta,后面记得勾选上哦!
打开微信开发者工具
重新编译,在浏览器的network界面可以看到请求,证明代理配置成功
4.4 whistle 自定义请求头
选择Values,creat 一个操作值
点击某个请求,打开Inspectors,可以在Request headers中看到多了两个自定义的请求头
The text was updated successfully, but these errors were encountered: