I'm calling a Microsoft graph API to create a team. The response is a 202
with a Location
header where I can get an async operation details.
How to get a response headers using @microsoft/microsoft-graph-client
module?
A similar post using C# doesn't apply here. This one also.
Here is my code with an attempt to get a raw response:
const client = Client.init({
authProvider: (done: any) => {
done(null, accessToken);
},
});
const response = client
.api(`/teams`)
.post(team, (error, response, responseRaw) => {
console.log(error); // null
console.log(response); // <empty string>
console.log(responseRaw); // undefined
});