Skip to content

Conversation

@AthanasiosKoumpouras
Copy link

No description provided.

@AthanasiosKoumpouras
Copy link
Author

This is happening when you try to use more than one client.

I have tried everything (How to structure the config for multiple clients).
using version ^4.0.0

//My current config
import axios from 'axios';
const clients = {
    ['default']: {
        client: axios.create({
            baseURL: 'http://foo/',
            responseType: 'json',
        }),
        options: {
            interceptors: {
                request: [
                    (store, config) => {
                        return config
                    }
                ]
            }
        }
    },
    ['bar']: {
        client: axios.create({
            baseURL: '/bar',
            responseType: 'json',
        }),
        options: {
            interceptors: {
                request: [
                    (store, config) => {
                        return config
                    }
                ],
                response: [
                    (store, response) => {
                        return response
                    }
                ]
            }
        }
    }
}

export default clients;

@AthanasiosKoumpouras
Copy link
Author

Any comment on this?

@vasilevich
Copy link
Collaborator

@AthanasiosKoumpouras
Sorry, I don't understand the purpose of this PR, can you please explain in more detail?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants