This commit is contained in:
David Wilson 2019-12-10 14:55:42 -08:00
Родитель b2c563c49b
Коммит b317064a51
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -11,7 +11,7 @@ import { isNode } from "../lib/util/utils";
import { WebResource, HttpRequestBody, TransferProgressEvent } from "../lib/webResource";
import { getHttpMock, HttpMockFacade } from "./mockHttp";
import { TestFunction } from "mocha";
import { axiosInstance } from '../lib/axiosHttpClient';
import { axiosInstance } from "../lib/axiosHttpClient";
const nodeIt = (isNode ? it : it.skip) as TestFunction;

Просмотреть файл

@ -48,8 +48,8 @@ class NodeHttpMock implements HttpMockFacade {
// https://github.com/ctimmerm/axios-mock-adapter/blob/8681af9c8375be4c5dc798f68a90154b5552cadd/src/index.js#L153-L166
axiosInstance.interceptors.request.use(
(config: AxiosRequestConfig) => ({
...config,
method: (config.method as Method) && (config.method as Method).toLowerCase() as Method
...config,
method: (config.method as Method) && (config.method as Method).toLowerCase() as Method
}));
// Reverse order of the handlers because Axios interceptors are stored