// origin baseURL: // I changed baseURL like: localhost:4000/api
const mock = new MockAdapter(axios, { delayResponse: 500 })
// I changed baseURL liket this: localhost:4000/ in axios2
const mock2 = new MockAdapter(axios2, { delayResponse: 500 })
//You can get image from localhost:4000/api/testPreviewImage
mock.onGet('/testPreviewImage').reply((request) => [200, testPreviewImage])
//Now You can get image from localhost:4000/testPreviewImage
mock2.onGet('/testPreviewImage').reply((request) => [200, testPreviewImage])
mock.onAny().passThrough()
mock2.onAny().passThrough()
It will be good if we can change axios config at onGet, onPost, or etc, like
When you initialize MockAdapter like this:
You should change axios config like this: