-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Description
Describe the bug
When using axios's getUri function with a callback provided to paramsSerializer configuration option, the callback is not respected.
There is a minimal reproducible code snippet attached to this bug report.
See full example on codesandbox:
https://codesandbox.io/p/sandbox/l4q5g3
To Reproduce
Create an axios instance and attempt to call getUri with a CustomParamsSerializer callback provided to paramsSerializer.
Code snippet
const AXIOS = new Axios({});
return AXIOS.getUri({
url: "https://www.example.com/api",
params: {hello: "world"},
paramsSerializer: () => "foo=bar"
});Expected behavior
URI should be:
https://www.example.com/api?foo=bar
URI is instead:
https://www.example.com/api?hello=world
Axios Version
1.7.7
Adapter Version
No response
Browser
Chrome
Browser Version
130
Node.js Version
No response
OS
No response
Additional Library Versions
React 18Additional context/Screenshots
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels