How pass extra parameters to Axios
See original GitHub issueI want to track progress of my POST request. With Axios I would usually pass an onUploadProgress
parameter to axios.post(...)
. With orval I would want to do this from the function/hook it generates. Is this currently possible? This seems to be a more general issue with other parameters of AxiosRequestConfig
not being exposed to the user of the orval.
What versions are you using?
**Package Version: 5.0.0-alpha.9 **Browser Version: Firefox 87
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Pass parameter/argument to axios interceptor - Stack Overflow
axios allows to pass some additional request parameters: axios.post('/api', `some body`, {headers: {'Content-Type': ' text/html ...
Read more >How to send query parameters using Axios? - RapidAPI
The other way to send query parameters to a GET request is by sending a params object along with it. Here is how...
Read more >GET Request Query Params with Axios - Mastering JS
The easiest way to make a GET request with Axios is the axios.get() function. The 2nd parameter to axios.get() is the Axios options:...
Read more >Send Request Query Parameters with Axios - Stack Abuse
In this article, we have explained how to include query parameters in GET requests made with Axios. Query parameters are additional pieces of ......
Read more >Passing custom props via axios config · Issue #2295 - GitHub
Describe the bug We use some custom parameters via axios configuration. They are used in the response interceptor.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I released a new version of orval which also handle a second argument with a mutator
Hello @OliverDudgeon, I published a new alpha with the possibility to pass an
AxiosRequestConfig
if you don’t use a mutator. I have an idea in the case you use mutator but it will need me more time to add it.