当前位置:网站首页>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.重新请求刚刚的接口,页面就会按照你想的那样展示了。
边栏推荐
- 小程序毕设作品之微信积分商城小程序毕业设计成品(6)开题答辩PPT
- Advanced Microservices Cloud Alibaba
- Why is the Kirin 9000 5G version suddenly back in stock?
- Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Work (5) Task Book
- vscode debugging and remote
- day10--install mysql on linux
- Redis【超详解!!!】
- spicy(一)基本定义
- 逆向分析实战2
- Nacos Configuration Center
猜你喜欢

Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (3) Background Functions

小程序毕设作品之微信二手交易小程序毕业设计成品(1)开发概要

WeChat second-hand transaction small program graduation design finished works (8) graduation design thesis template

ospf map

Shell脚本基本编辑规范及变量

Eureka Registry

Transformation of traditional projects

逆向分析实战2

AI智能安防视频平台EasyCVR如何配置音视频同时传输?

vscode debugging and remote
随机推荐
小程序毕设作品之微信二手交易小程序毕业设计成品(6)开题答辩PPT
spicy (two) unit hooks
论坛管理系统
Microservice CAP Principles
小程序毕设作品之微信二手交易小程序毕业设计成品(7)中期检查报告
Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Work (5) Task Book
EasyNVR平台级联到EasyCVR,视频播放一会就无法播放是什么原因?
STM32 SPI+WM8978语音回环
Transformation of traditional projects
(6) "Digital Electricity" - Diodes and CMOS Gate Circuits (Introduction)
新型LaaS协议Elephant Swap给ePLATO提供可持续溢价空间
MySQ deadlock
High Concurrency Framework Disruptor
小程序毕设作品之微信二手交易小程序毕业设计成品(2)小程序功能
Anti-shake and throttling
cv2.polylines
TCP congestion control technology and acceleration principle of BBR
day10--install mysql on linux
The difference between BGP room and ordinary room in Beijing
Hongji was once again shortlisted in the Gartner 2022 RPA Magic Quadrant and achieved a significant jump in position