I have a question that is very similar to this post: How to retrieve response headers using Microsoft Graph API
The main difference I noticed (correct me if I'm wrong) is that I am utilizing MSGraphClientFactory.getClient() from '@microsoft/sp-http' instead of { Client } from @microsoft/microsoft-graph-client.
Here's my current code :
const Rawresponse = graphClient.api("/teams/" + groupID + '/archive')
.version('v1.0')
.responseType("raw")
.post((error, responseRaw) => {
console.log(error);
console.log(responseRaw);}
).then(response => console.log("then response : ", response.header));
You can find the documentation for the request here.
Thank you in advance.
PS: I came across this post as well as the mentioned documentation, but none of them seemed to help. After giving it some thought, it's not surprising that the code in the client's documentation didn't work for me since I'm not using that specific client.