浏览器发送POST请求
·
一、Chrome浏览器过滤POST请求
按F12打开控制台,选择Network(),在Filter输入栏输入 method:POST,即可
二、Chrome浏览器发送POST请求
按F12打开控制台,选择Console,输入请求接口:
> fetch(new Request('url',{
method:'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body:"param1=value1¶m2=value2"
})).then((resp)=>{console.log(resp)})
fetch("https://www.cnblogs.com/dolphin0520/ajax/GetPostStat", {
"headers": {
"accept": "application/json, text/javascript, */*; q=0.01",
"accept-language": "zh-CN,zh;q=0.9",
"content-type": "application/json; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"96\", \"Google Chrome\";v=\"96\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://www.cnblogs.com/dolphin0520/p/3932921.html",
"referrerPolicy": "origin-when-cross-origin",
"body": "[3932921]",
"method": "POST"
});
更多推荐
所有评论(0)