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
Hello there,
Axios-retry is a excellent lib. I'm reading it's code, and there is something I don't understand.
According to the code here and here, Axios will only merge some predefined attributes on config, which means axios-retry config will get lost.
However, axios-retry works just fine, and config didn't lose.
This makes me confused, and I can't figure out why is that.
Any help will be appreciated.
The text was updated successfully, but these errors were encountered:
If I understand correctly your question, the answer is here https://github.com/axios/axios/blob/master/lib/core/Axios.js#L37
All the properties of config object are merged, not only predefined ones. This allows axios-retry to add its own internal config here https://github.com/softonic/axios-retry/blob/master/es/index.js#L89
Hope this helps.
Sorry, something went wrong.
@mawrkus Thanks for the reply.
I figured it out.
Axios-retry never extends Axios's default config. It uses interceptors to add its config before every request is sent.
https://github.com/softonic/axios-retry/blob/master/es/index.js#L175
This explains everything.
BTW, Axios doesn't merge properties that are not predefined.
No branches or pull requests
Hello there,
Axios-retry is a excellent lib.
I'm reading it's code, and there is something I don't understand.
According to the code here and here, Axios will only merge some predefined attributes on config, which means axios-retry config will get lost.
However, axios-retry works just fine, and config didn't lose.
This makes me confused, and I can't figure out why is that.
Any help will be appreciated.
The text was updated successfully, but these errors were encountered: