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
https://github.com/axios/axios#config-defaults
As "the goal is to support most/all features", Config Defaults also seems to be an important feature.
Currently, something like:
instance.defaults.headers.get['Content-Type'] = 'application/json'`
Results in:
Uncaught TypeError: instance.defaults.headers is undefined
The text was updated successfully, but these errors were encountered:
@leomp12 I wasn't aware of that usage pattern. FWIW defaults are supported, we just don't prepopulate the headers object. You can do this:
instance.defaults = { headers: { 'Content-Type': 'application/json' } };
or this:
axios = axios.create({ headers: { 'Content-Type': 'application/json' } })
Sorry, something went wrong.
Great @developit , I'll give a try, thanks!
No branches or pull requests
https://github.com/axios/axios#config-defaults
As "the goal is to support most/all features", Config Defaults also seems to be an important feature.
Currently, something like:
Results in:
Uncaught TypeError: instance.defaults.headers is undefined
The text was updated successfully, but these errors were encountered: