Skip to content
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

baseURL doesn't work #41

Closed
mahdisalehian opened this issue Jun 19, 2020 · 2 comments
Closed

baseURL doesn't work #41

mahdisalehian opened this issue Jun 19, 2020 · 2 comments
Labels
has fix A fix is PR'd or merged, but not yet released

Comments

@mahdisalehian
Copy link

mahdisalehian commented Jun 19, 2020

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
Copy link

This has already been noted and a fix has been provided at #20

@developit
Copy link
Owner

developit commented Jul 23, 2020

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.

@developit developit added the has fix A fix is PR'd or merged, but not yet released label Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has fix A fix is PR'd or merged, but not yet released
Projects
None yet
Development

No branches or pull requests

3 participants