I asking the exact question as this post here : How to get a response headers using Microsoft graph API
The only difference (to me?) is that i'm using MSGraphClientFactory.getClient() from '@microsoft/sp-http' instead of { Client } from @microsoft/microsoft-graph-client.
My code so far :
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));
Doc about the request itself.
Thanks in advance
PS : found this post along with the mentionned doc but nothing work. Afterthought : not quite suprising that the code in the client's doc doesn't work since I'm not using the client.