I am trying to convert the response to blob and then generate url to access that. The response from the get request is Pdf.
Here's what I am doing.
this.$http.get<string>(
invoicePath
).then((response:any)=> {
console.log("CREATING A BLOB")
console.log("RESPONSE BLOB: ", response.data);
const blob:any = new Blob([response], { type: 'application/pdf; charset=utf-8' });
console.log("RESPONSE BLOB: ", blob);
const url= window.URL.createObjectURL(blob);
// window.open(url);
return url
//window.location.href = response.url;
})
