I am using the forge fetch api to get a application/pdf type response content.
The forge fetch api call is as below,
fetch(
method: 'GET',
responseType:'application/pdf'
}
).then(async (resp) => {
console.log(await resp.arrayBuffer()); // logs "{}" in my console
})
resp.arrayBuffer() always return a empty JSON Object rather than a buffer array.
Can someone help me with this?
The Response Headers of the fetch call are
'accept-ranges': 'bytes'
'content-length': '227150'
'content-type': 'application/pdf'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.