当前位置:网站首页>Charles 替换 接口响应信息
Charles 替换 接口响应信息
2022-07-30 04:06:00 【寂静花开】
场景:
需要测试某个接口返回页面的某种场景,但当前测试环境下,没有响应的场景case可以返回你需要的内容。
例如,你想看看页面支不支持html超链接,但是此时接口的响应文件中,并没有返回html的超链接。
这时候可以用Charles来替换需要测试的接口的响应文件。
步骤
1.打开Charles,找到对应的接口信息
这里用任何一个抓包工具都可以,谷歌浏览器自带的都可以
右键点击,保存响应文件
2.打开这个响应文件,编辑成你需要的内容,保存
3.回到Charles,右键点击这个接口,点击最后的map local
a.如果你需要多次请求这个接口,且请求head会变动,可以把a中的内容删掉
b.在b框中选择你需要替换的文件进行替换
4.重新请求刚刚的接口,页面就会按照你想的那样展示了。
边栏推荐
- vscode debugging and remote
- SQL introduction of the first lecture -- MySQL 8.0.29 installation tutorial (Windows 64 - bit)
- SQLSERVER merges subquery data into one field
- Wechat second-hand transaction small program graduation design finished product (1) Development overview
- The curl command to get the network IP
- spicy (two) unit hooks
- 第51篇-知乎请求头参数分析【2022-07-28】
- SQL Server data type conversion function cast () and convert () explanation
- Pytorch框架学习记录2——TensorBoard的使用
- Pytorch framework learning record 7 - convolutional layer
猜你喜欢

Roperties类配置文件&DOS查看主机网络情况

Microservice CAP Principles

SQL introduction of the first lecture -- MySQL 8.0.29 installation tutorial (Windows 64 - bit)
![[ 云原生之谜 ] 云原生背景 && 定义 && 相关技术详解?](/img/eb/0cd6891fcc00d2c01ba8bd7f8d0822.png)
[ 云原生之谜 ] 云原生背景 && 定义 && 相关技术详解?

Pytorch framework learning record 2 - the use of TensorBoard

Pytorch框架学习记录4——数据集的使用(torchvision.dataset)

Smart answer function, CRMEB knowledge payment system must have!

CMake installation and testing

ospf map

Redis server启动后会做哪些操作?
随机推荐
Monitor page deployment
Pytorch框架学习记录2——TensorBoard的使用
小程序毕设作品之微信积分商城小程序毕业设计成品(6)开题答辩PPT
高并发框架 Disruptor
Shell脚本基本编辑规范及变量
ospf map
Uptime Monitoring: How to Ensure Network Device Uptime
CMake installation and testing
Pytorch框架学习记录7——卷积层
Flink学习第一天——什么是批量、流式计算?
High Concurrency Framework Disruptor
New LaaS protocol Elephant Swap provides ePLATO with sustainable premium space
Resampling a uniformly sampled signal
The first immersive and high-fidelity metaverse in China, Xiyuan Universe is officially launched
防抖与节流
Tcp编程
Alibaba search new product data API by keyword
flutter 记录学习不一样的动画(一)
The first day of Flink learning - what is batch and streaming computing?
STM32 SPI+WM8978语音回环