Bug: baseURL ignored when request path starts with / in kiattp/axios
Description
When using the kiattp/axios compatibility layer, axios.create({ baseURL }) does not correctly join the baseURL with request paths that start with a leading /.
This behavior differs from the official axios implementation and breaks drop-in compatibility.
Reproduction
import { axios } from 'kiattp/axios'
const client = axios.create({
baseURL: '/api',
})
// Expected URL: /api/auth/login
// Actual URL: /auth/login (baseURL ignored)
await client.post('/auth/login', {
email: 'test@test.com',
password: 'test',
})
Bug:
baseURLignored when request path starts with/inkiattp/axiosDescription
When using the
kiattp/axioscompatibility layer,axios.create({ baseURL })does not correctly join thebaseURLwith request paths that start with a leading/.This behavior differs from the official
axiosimplementation and breaks drop-in compatibility.Reproduction