|
发表于 2020-8-14 10:49:03
|
显示全部楼层
刚研究出来的,不用等一小时 xsrf-token可能需要改成自己的
var details = {
'sceneId': 'fd6ecd7208af42cf9979ef558dd1e976',
'forceClose': 'false'
};
var formBody = [];
for (var property in details) {
var encodedKey = encodeURIComponent(property);
var encodedValue = encodeURIComponent(details[property]);
formBody.push(encodedKey + "=" + encodedValue);
}
formBody = formBody.join("&");
fetch("https://developer.aliyun.com/adc/api/closeSceneById?p_csrf=8051ce08-fc40-453b-be23-e454c6e9602e", {
"headers": {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
"cache-control": "no-cache",
"content-type": "application/x-www-form-urlencoded",
"pragma": "no-cache",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest",
"x-xsrf-token": "8051ce08-fc40-453b-be23-e454c6e9602e"
},
"referrer": "https://developer.aliyun.com/adc/scenario/exp/fd6ecd7208af42cf9979ef558dd1e976",
"referrerPolicy": "no-referrer-when-downgrade",
"body": formBody,
"method": "POST",
"mode": "cors",
"credentials": "include"
}) |
|