NuxtN
Nuxt4y ago
Markeem

How to return blob (application-pdf) from api route

Hey I am using the Browserless.io api to generate pdf files, which returns a Blob (application/pdf). When I return the blob as is, i only get a proxy object on the client side with nothing in it. It works when using:

Buffer.from(await data.text()).toString('base64')


Is this the right way to do it ?
Was this page helpful?