-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Infer responseType from response headers? #793
Comments
same problem |
This would be awesome!! I'm having an issue where an API sends json on error and binary data on success so I'm having issues with axios automatically encoding the json in arraybuffer despite content-type being |
Closed in favor of #811. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I wanted to use axios to download a image from the server. At the beginning I try to do this:
But obviously the image downloaded is broken. Then I toke a lot of time to go over the whole document and figure it out I have to set the responseType manully:
Is there any chance that axios can figure reponseType out automatically?
If it can't, I think it's better to make it more clear in the doc(expecially what does stream mean, as well as blob and buffer).
Thx
The text was updated successfully, but these errors were encountered: