【发布时间】:2021-12-30 18:11:19
【问题描述】:
pm.sendRequest(options, function (err, res) {
if (res.code == 400) {
throw new Error("Invalid");
}else{
pm.request.headers.add({
key: "Authorization",
value: 'Bearer '+res.json().access_token});
}
});
高于预请求脚本抛出错误
Response: There was an error in evaluating the Pre-request Script:Error: Invalid
邮递员版本:9.7.1, 操作系统:Windows, 应用类型:Postman 桌面应用
【问题讨论】:
标签: javascript postman postman-pre-request-script