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

Wrong parameters multiClientMiddleware #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants