Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make binary GETs work #10

Open
awlayton opened this issue Jan 26, 2020 · 2 comments
Open

Make binary GETs work #10

awlayton opened this issue Jan 26, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@awlayton
Copy link
Member

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.

@awlayton awlayton added the bug Something isn't working label Jan 26, 2020
@abalmos
Copy link
Member

abalmos commented Jan 26, 2020 via email

@awlayton awlayton added enhancement New feature or request and removed bug Something isn't working labels Jan 26, 2020
@awlayton
Copy link
Member Author

Yeah I did it myself in axios right now.

@awlayton awlayton changed the title Binary GETs do not work Make binary GETs work Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants