当前位置:网站首页>Charles uses three ways to modify requests and responses
Charles uses three ways to modify requests and responses
2022-04-23 03:12:00 【A happy wild pointer D】
1. Breaking point
(1) First, execute it manually , Let the request appear in charles In the conversation list on the left .
We want to check that the material name contains “ masks ” Material information .


(2) Select the session , Right click , choice Breakpoints

(3) Refresh the page , At this time, the browser sends a request , It stopped charles Agent here , It hasn't been sent to the server yet .
After refreshing, the browser interface will automatically jump to charles In the interface , Click on Edit Request You can modify the request parameters . Click... Below after modification Execute, Send a request to .

(4) After receiving the response from the server , Click on Edit Response, Modify the response content , Click again on the Execute, Return the response to the browser .

(5) The browser displays the returned data .
Here you can see , We wanted to check “ masks ” Of information , By modifying the parameters of the request , The server returned to us “ The thermometer ” Information about .

2.Map Local
(1)Tools→Map Local , Click on Add


Or you can directly select the session , Right click , choice Map Local. Open the page in this way host、port It has been filled in automatically .

(2) Fill in Map From The agreement 、host、port、path etc.

(3) Select local file as response return . You can copy the response information to json In file , Or right click →Save Response.... Save to local , Then modify it according to your own needs .

(4) Go to the browser and make a request .
Once you set it up , The response content of all qualified requests will be replaced with the configured local file .
You can see , I'm looking for monitoring materials now , But it shows what I just specified json Contents of the file .

3.Map Remote
(1)Tools→Map Remote, Check Enable Map Remote, Click on Add, add mapping

(2) Prepare the data
stay fastmock The platform creates an interface , Return the information of login failure . In this way, whether the login name is correct or not , Are prompted by login errors , Unable to log in to the home page .

(3) Initiate request
You can see ,mms Your login request is mapped to mock The interface of


版权声明
本文为[A happy wild pointer D]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220627538103.html
边栏推荐
- ASP.NET 6 中间件系列 - 执行顺序
- 使用DFS来解决“字典序排数”问题
- [untitled]
- Realize QQ login with PHP
- 2022a special equipment related management (elevator) work license question bank and simulation examination
- Distributed system services
- The most easy to understand dependency injection and control inversion
- C语言实现通讯录----(静态版本)
- 队列的存储和循环队列
- MAUI初体验:爽
猜你喜欢
![[MySQL] left Function | Right Function](/img/26/82e0f2280de011636c26931a74e749.png)
[MySQL] left Function | Right Function

TP5 inherits base and uses the variables in base

Recursion - outputs continuously increasing numbers

The most easy to understand dependency injection and control inversion

Blazor University (12) - component lifecycle

MYSQL05_ Ordr by sorting, limit grouping, group by grouping

在.NE6 WebApi中使用分布式缓存Redis
![[Mysql] LEFT函數 | RIGHT函數](/img/26/82e0f2280de011636c26931a74e749.png)
[Mysql] LEFT函數 | RIGHT函數

2022g2 boiler stoker examination question bank and online simulation examination

研讨会回放视频:如何提升Jenkins能力,使其成为真正的DevOps平台
随机推荐
Queue storage and circular queue
2022t elevator repair test simulation 100 questions and online simulation test
C read / write binary file
C WPF UI framework mahapps switching theme
Tencent video VIP member, weekly card special price of 9 yuan! Tencent official direct charging, members take effect immediately!
The whole network is the most complete. How to do interface automation test? Proficient in interface automation test details
Establishing and traversing binary tree
Source code interpretation of Flink index parameters (read quantity, sent quantity, sent bytes, received bytes, etc.)
The most easy to understand dependency injection and control inversion
利用栈的回溯来解决“文件的最长绝对路径”问题
LoadRunner - performance testing tool
A set of C interview questions about memory alignment. Many people make mistakes!
Mysql database
Flink实时数仓项目—DWS层设计与实现
Detailed log display of openfeign call
建立与遍历二叉树
MAUI初体验:爽
Use DFS to solve the problem of "number of dictionary rows"
ASP.NET 6 中间件系列 - 执行顺序
Xamarin effect Chapter 22 recording effect