baseURL doesn't work
mahdisalehian opened this issue · 2 comments
mahdisalehian commented
I used baseURL in react but it doesn't affect the url
//axios-order.js
import axios from 'redaxios';
const instance = axios.create({
baseURL: 'http://something.com/api'
});
export default instance;
//login.js
import axios from './axios-order';
const url = '/auth/admin-login';
const authData = {
mobile: mobile,
password: password
};
axios.post(url, authData)
.then(response => JSON.parse(response.data))
.catch(error => {
console.log(error)
})
i receive this :
index.js:168 POST http://localhost:3000/auth/admin-login 404 (Not Found)
rschristian commented
This has already been noted and a fix has been provided at #20
developit commented
Yep yep - apologies for the slow release, I got stuck refactoring interceptors and then the work week ended.
Update: version 0.3.0 is published.