-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Axios 0.21.1 and 0.20.0 not merging url with baseURL #3663
Comments
See #3579 (comment). |
Yep I'm having the same issue although slightly different use case CommonAPI.js const axios = require('axios');
const someAPI = axios.create({
baseUrl: 'https://someapiwebsite/v1/',
timeout: 1000,
headers: {
'Some-Api-Version': '1.0.0',
'Authorization': process.env.MY_TOKEN
}
});
module.exports = someAPI; Calling statement const someAPI = require('../../somehwhere/SomeAPI.js');
const blocks = someAPI.get(`blocks/${FAQ_PAGE_ID}/children`); |
Yup exactly. I'm also having this issue as I just updated my axios version in the project. I cloned runkit from @sebnapi notice on version 0.21.1 the https://runkit.com/liger/60eedbdbb3e7b0001a2dc521 I was able to trace back to this PR: #2391 |
0.21.4 still not working |
I have released 0.22.0 please check if that fixes your error, if not please open a new issue :) |
Describe the bug
I was just encountering the problem locally, that the new axios version is not merging
url
withbaseURL
. I found some issues with version 0.19.0 Issue #2190 where the params are not merged. I used the runnable example to showcase my problem:To Reproduce
https://runkit.com/sebnapi/axios-0-21-1
Expected behavior
Request gets fullfilled with uri appended to baseURL.
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: