您当前的位置: 首页 >  ar

zmc@

暂无认证

  • 3浏览

    0关注

    142博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

charles模拟、修改返回数据问题(骚操作)

zmc@ 发布时间:2018-11-21 23:23:24 ,浏览量:3

1.对某个请求右键,选择map Local

2.

3.选择choose----本地文件(此处为记事本)

(将Charles中的  response中的值  替换成自己想要的 response-----使用本地文件保存)

例如:本地文件中的内容为:

{
	"success": true,
	"code": "0",
	"msg": "success",
	"data": [{
		"action": "fdd-ddws://agent-store/esf_common_house_list?houseType=70",
		"id": 27,
		"name": "全网xxxx",
		"text": "",
		"type": 6,
		"url": "https://fs.fangdd.com/duoduoxueyuan/yunying-shipin/FhsLOfJrGdb4hOGDlAS0VigGyCuX.png"
	}, {
		"action": "fdd-ddws://agent-store/enturs_house_list",
		"id": 24,
		"name": "专属xxxx",
		"text": "",
		"type": 6,
		"url": "https://fs.esf.fangdd.com/efab/Fk3vyYztOfE80yrv1ar2YXMiGxq4.png"
	}, {
		"action": "fdd-ddws://agent-store/esf_common_house_list?houseType=10",
		"id": 25,
		"name": "公司xxxx",
		"text": "",
		"type": 6,
		"url": "https://fs.fangdd.com/duoduoxueyuan/yunying-shipin/FnotnywkWPVVuPE0jsMC8mo9C1bt.png"
	}, {
		"action": "fdd-ddws://agent-store/tools_owner_house_list",
		"id": 26,
		"name": "业主xxxx",
		"text": "",
		"type": 6,
		"url": "https://fs.fangdd.com/duoduoxueyuan/yunying-shipin/FoAeoyExnPapwVauhbpw04gNgLXU.png"
	}]
}

即---app中的该请求的返回值会使用该本地文件中的返回值----达到替换返回值的效果---无需前端为了造数据再多给出返回值或者入口;

 

 

关闭该功能:

方法一:去掉map local前面的小勾

方法二:点击上图 map local,去掉下图中的文件前的小勾

 

 

 

 

 

 

关注
打赏
1643271353
查看更多评论
立即登录/注册

微信扫码登录

0.1090s