redux-axios-middleware icon indicating copy to clipboard operation
redux-axios-middleware copied to clipboard

Wrong parameters multiClientMiddleware

Open AthanasiosKoumpouras opened this issue 7 years ago • 3 comments

AthanasiosKoumpouras avatar Dec 20 '17 15:12 AthanasiosKoumpouras

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 avatar Dec 20 '17 18:12 AthanasiosKoumpouras

Any comment on this?

AthanasiosKoumpouras avatar Feb 02 '18 21:02 AthanasiosKoumpouras

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

Thanks.

vasilevich avatar Sep 05 '19 14:09 vasilevich