question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for axios.default.params?

See original GitHub issue

Is there any way to get support for axios.default.params? Does this exist already? I really love the deafult functionality for headers, I think it makes a lot of sense.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

41reactions
reggicommented, Feb 8, 2016

This works:

axios.defaults.params = {}
axios.defaults.params['public_key'] = publicKey
6reactions
libasolescommented, Jul 2, 2019

Issue, they say, is with v0.19. Downgrading to 0.18.1 should work. See: https://github.com/axios/axios/issues/2190

There’s a working demo of this: https://runkit.com/philipbjorge/axios-regression

However, I downgraded and still can make it work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Axios config default GET param - Stack Overflow
method 1: setting axios.defaults.params at the class level axios.defaults.params = {} axios.defaults.params['api-key'] = secret.
Read more >
How to use the axios.defaults function in axios - Snyk
To help you get started, we've selected a few axios.defaults examples, ... axios.defaults.params = { format: 'json' }; const _formatColors = colors ...
Read more >
Config Defaults | Axios Docs
Config Defaults. Config Defaults. You can specify config defaults that will be applied to every request. Global axios defaults. axios.defaults.
Read more >
Passing default params in axios using NuxtJS (Interceptors)
You will need to extend the axios to customize the default behaviour. Then you need to create a file named axios. js inside...
Read more >
Understanding Axios GET requests - LogRocket Blog
Learn how to make GET requests in Axios with query parameters and API ... On the client side, Axios also supports protection against...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found