【发布时间】:2022-01-21 16:27:38
【问题描述】:
我想使用邮递员预取脚本从受 aws 签名保护的 api 刷新我的应用程序机密。我能够进行这样的基本身份验证。但是我需要一个 aws 签名认证
var url = "https://some.endpoint"
var auth = {
type: 'basic',
basic: [
{ key: "username", value: "postman" },
{ key: "password", value: "secrets" }
]
};
var request = {
url: url,
method: "GET",
auth: auth
}
pm.sendRequest(request, function (err, res) {
const json = res.json() // Get JSON value from the response body
console.log(json)
});
【问题讨论】:
标签: postman postman-pre-request-script