When using these headers, the API returns byte data as a response.
let headers = {
headers: new HttpHeaders({
'Content-Type': 'application/octet-stream',
'responseType':'arraybuffer' as 'json',
'uid':uid
})
};
The API request is returning byte data.
this.http.get(url,headers)
.pipe(map((res)=>{
console.log(res)
return res;
}),err=>{
console.log(err) //receiving HttpErrorResponse
return err;
}