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
Passing custom props via axios config #2295
Comments
I have the same problem |
I need this too. I had this working in 0.18 but it stopped working in 0.19 I used something like this: await axios({
url: '/search',
method: 'GET',
params,
myCustomParameter: true
} as ICustomAxiosRequestConfig) but it no longer shows up in the interceptor config: axios.interceptors.request.use(function (config) {
}) Edit: just confirmed this works in 0.18.1 so I'm reverting back for now |
Same Here. Reverting back to 18.1 works. |
Revert to 18.1 as well |
Me too. But why 0.19.0 can't do? |
Same here. I'm not able to use custom param in AxiosRequestConfig in 0.19.0 anymore. It would be awesome if there was possibility to use some custom id per request. I'm using response interceptor for global error handling but in a few requests (2-3 of 50) I need different behavior. |
I found 0.19 introduce https://github.com/axios/axios/blob/master/lib/core/mergeConfig.js#L18-L42 |
so, What should I do, i need config resetful API |
Either revert back to v.18 or wait for a fix. |
When to Consider Re-support ? 😃 |
need this too |
BLOODY +1 i lost 4h of work until found this issue |
This is why I was thinking about something like #1890 ... hope we cen resolve it fast. |
I revert back to axios@0.18.0, and there is no BREAKING CHANGE described in 0.19.0 ??!!😱️ |
+1 |
Need this too. Revert to 0.18.0 as well. |
I think axios should consider opening the interface to custom configuration parameters or backing out the version |
This change is already in master, it's a matter of releasing a new version, possibly this upcoming week, cc @emilyemorehouse, this is the PR: https://github.com/axios/axios/pull/2207/files |
sorry guys for the inconvenience, hopefully we can have a new version released soon, in the meantime using 0.18 is the best alternative |
No need to filter out stuff like this in Javascript. Being able to do stuff like this is one of the amazing parts of the language! |
+1 |
1 similar comment
+1 |
I'm still think that we should create something similar to what I described in #1890 in the future releases. It has some advantages I can think of right now:
I'm not saying that the object/property name should be |
Any updates on on this? Still stuck with 0.18.1 due to this. I get the love for typescript, but please revert this to the previous behavior :( |
Yeah, I just ran into the same issue for my vue app. I just wanted to mock some delay function for the requests, to test the app's stability. An update or workaround for this would be nice. |
Great lib, but same for me. I need custom properties |
+1 |
1 similar comment
+1 |
Yeah, custom properties will be very helpful. Thank you, guys for this awesome tool! |
+1 |
1 similar comment
+1 |
Fixed in #2207. |
Same, param is missing, 18.1 is a solution (for now). Thanks @Alex-Sokolov. |
But 0.19.1 should solves this. We've updated and tested this successfully, so there is no need for a downgrade anymore. |
Describe the bug
We use some custom parameters via axios configuration. They are used in the response interceptor. Sometimes there may be a lot of information there, so the option to pass it through the
headers
orparams
is not suitable for us because of the length limitTo Reproduce
axios@0.18.0
)axios@0.19.0
)Expected behavior
Custom config parameter passed. Or the ability to use another config option to pass custom data.
Environment:
Additional context/Screenshots
First messages with axios 0.18, second with 0.19
The text was updated successfully, but these errors were encountered: