Angular7 httpclient get调用无法将PDF解析为blob

Angular7 httpclient get调用无法将PDF解析为blob,get,httpclient,angular7,Get,Httpclient,Angular7,Angular7 Httpclient GET请求不允许设置{responsetype:'application/pdf'}我尝试了blob、bytearray等组合。 将其视为JSON并在JSON.parse上失败 我尝试了不同的组合,如arraybuffer、blob let requestOptions: Object = { /* angualr 7 is not allowing this for some reason */ responseType: 'application/p

Angular7 Httpclient GET请求不允许设置{responsetype:'application/pdf'}我尝试了blob、bytearray等组合。 将其视为JSON并在JSON.parse上失败

我尝试了不同的组合,如arraybuffer、blob

let requestOptions: Object = {
/* angualr 7 is not allowing this for some reason  */
responseType: 'application/pdf'
}
/* not working */
return this.http.get<any>(this.streamURL , requestOptions);
let requestOptions:Object={
/*Angular 7出于某种原因不允许这样做*/
响应类型:'application/pdf'
}
/*不起作用*/
返回this.http.get(this.streamURL,requestOptions);

请告诉我,我需要一个方法将响应读取为PDF而不是JSON。

同样的问题,但对我来说,它是JSON而不是PDF