这里就用CSDN的首页搜索功能做例子
一、拿到要测试的接口相关信息(学会用F12找接口,这里不详细介绍)
找到接口关键信息为:
-
请求 URL:
https://silkroad.csdn.net/api/v2/rcmd/list/channel/pc_toolbar_associateword
-
请求方法:
POST
-
accept:
application/json, text/javascript, */*; q=0.01
-
accept-encoding:
gzip, deflate, br
-
accept-language:
zh-CN,zh;q=0.9
-
content-length:
184
-
content-type:
application/json
-
origin:
https://blog.csdn.net
-
referer:
https://blog.csdn.net/
-
user-agent:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
-
请求内容:{"chann