I'm trying the following code:
let myHeader = new HttpHeaders();
myHeader.append("Authorization", Token);
return this.http
.get(this.service.GetDomainPrefix() + "Source/Download/" + id,
{
headers: myHeader, responseType: ResponseContentType.Blob
}).map(res => {
return {
filename: name + '.mp4',
data: res.blob()
};
})
but getting the following error:
Argument of type '{headers: HttpHeaders; responseType: ResponseContentType.Blobl;}' is not assignable to parameter of type 'RequestOptionsArgs'. Type 'HttpHeaders' is not assignable to type 'Headers'
The problems is only with the headers, because without it there are no errors. How can I add a head to my get request?