Open awlayton opened 4 years ago
For the record, binary resources in oada-cache is a feature in waiting. May need to request them with something else for now.
On Sat, Jan 25, 2020, 7:25 PM Alex Layton notifications@github.com wrote:
When I do a GET on a binary resource the data I get back is corrupted. Please see below for the oada-cache call I tried and then an axios request which returns the correct data.
const { data, headers } = await conn.get({ path })
const { data, headers } = await axios.get(path, { baseURL: domain, headers: { Authorization:
Bearer ${token}
}, responseType: 'arraybuffer' })Perhaps all that is needed to address this is a way to ask oada-cachefor an arraybuffer response.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OADA/oada-cache/issues/10?email_source=notifications&email_token=AAOHLBM644WUFBDYC2ZGLXDQ7TJ77A5CNFSM4KLT5RAKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IIXBQKA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOHLBNOFVJXIV5H6WYUC4DQ7TJ77ANCNFSM4KLT5RAA .
Yeah I did it myself in axios right now.
When I do a GET on a binary resource the
data
I get back is corrupted. Please see below for the oada-cache call I tried and then an axios request which returns the correct data.Perhaps all that is needed to address this is a way to ask oada-cachefor an
arraybuffer
response.