Level 63
I just found this on the web.
axios({
url: 'api/downloadPdf',
method: 'GET',
responseType: 'arraybuffer',
}).then((response) => {
let blob = new Blob([response.data], {
type: 'application/pdf'
})
let link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = 'test.pdf'
link.click()
});
I think that the solution i probably somewhere with the responseType and the blob.