We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Why can this request be successfully sent? The base URL doesn’t end with a /, and the request URL doesn’t start with one either.
const request = { admin: createAPI('http://localhost:8080/api') }; function createAPI(url) { // 构建不同端口的异步请求数据 const axiosData = axios.create({ baseURL: url, timeout: 7000 }); return axiosData; } request.admin .get('sysmangt/professionmangt') .then(res => { if (res.code === 200) { console.log(res.data); } })
No response
1.6.5
HTTP
Edge
latest
18
The text was updated successfully, but these errors were encountered:
Hi @liuyangjuncong20202570, I have tried this, and it's working fine.
https://codesandbox.io/p/sandbox/try-axios-forked-chmhw7
Sorry, something went wrong.
No branches or pull requests
Describe the issue
Why can this request be successfully sent? The base URL doesn’t end with a /, and the request URL doesn’t start with one either.
Example Code
Expected behavior
No response
Axios Version
1.6.5
Adapter Version
HTTP
Browser
Edge
Browser Version
latest
Node.js Version
18
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: