We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Axios request fails on a 302 status code when a custom scheme / protocol is in the location header.
On react-native, it gives a NETWORK_ERROR instead of a unsupported protocol.
This is related to #4901.
Call an endpoint with axios that returns a 302 with a Location header that is not a supported protocol by axios, like smartbills://
var axios = require("axios") axios.get("https://axios.free.beeceptor.com/scheme", {maxRedirect:0}).then(() => console.log("success")).catch((error) => { console.error(error.request) throw error; });
I don't except the client to crash because the server response is valid. I should be able to handle the redirect as I wish.
As we use it for OAuth2, any client can pass their own app scheme, so we need to be able to detect it and redirect the user to the client app.
1.3.4
No response
React native 0.71
The text was updated successfully, but these errors were encountered:
Same problem here. Still happening on axios 1.7.2 on React Native.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Axios request fails on a 302 status code when a custom scheme / protocol is in the location header.
On react-native, it gives a NETWORK_ERROR instead of a unsupported protocol.
This is related to #4901.
To Reproduce
Call an endpoint with axios that returns a 302 with a Location header that is not a supported protocol by axios, like smartbills://
Code snippet
Expected behavior
I don't except the client to crash because the server response is valid. I should be able to handle the redirect as I wish.
As we use it for OAuth2, any client can pass their own app scheme, so we need to be able to detect it and redirect the user to the client app.
Axios Version
1.3.4
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: