有个目录叫前台,前台下有几个接口,前台目录也设置了预执行脚本,但为什么旗下的接口不能执行前台的脚本?
前台目录这里设置了头Authorization,但接口完全没有看到Authorization头,为什么?
Apipost V8.1.13
补充:
await $.ajax({
"url": "https://go.apipost.cn",
"method": "POST",
"content-type": "appication/json",
"data": JSON.stringify({
"email": pm.environment.get("host"),
"password": "111"
}),
"success": function (response) {
response = typeof response == "object" ? response : JSON.parse(response);
console.log(response);
pm.environment.set("body", JSON.parse(response.body).email);
apt.setRequestHeader("body", pm.environment.get("body"));
}
});
但我是想要目录下全局设置authorization头,不是body啊?
之前一直用的好好的,更新之后就不行了
我就算直接设死header:username-aaa,在下面的接口都没看到username头