I'm using the request-promise-native library, and I'm trying to get the full response from a request instead of just body because there is something in the response header I need to log. I know usually to accomplish that task you would do something like so:
request.post(opts).then(function (response) {
//response
}).catch(function (err) {
// error
})
but I'm using Async/await, so my code looks something like this: const data = await request.post(opts)
, however, this will only return the body of the response I want access to the header as well, how would I go about doing that?