Im正在访问一个API,该API的返回值除了回答他的cookie外。 但我看不到代码中。我可以看到邮递员返回的cookie。 我正在使用请求承诺库,我只看到答案,而不是cookie。
如何从答案中获取Cookie?
return rp(baseAddress, { form: apiCredentials, json: true, method: "POST" })
.then(response => {
if (response) {
console.log(response)
}
else {
DefaultLogger.error("could not authenticate ", response)
})