diff --git a/src/index.ts b/src/index.ts index f1a414c..a937afe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -134,7 +134,7 @@ export default class AxiosWrapper { async request(methodParams: ApiMethodParams): Promise { const {method, url, data = null, params, options = {}, retries = 0} = methodParams; - const axiosSettings: AxiosRequestConfig = options.requestConfig || {}; + const axiosSettings = options.requestConfig || {}; const {concurrentId, collectRequest = true, timeout, headers, onDownloadProgress} = options; if (concurrentId) { this.cancelRequest(concurrentId); diff --git a/src/models/index.ts b/src/models/index.ts index fd6540c..f9b8138 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,4 +1,4 @@ -import {AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse} from 'axios'; +import {AxiosRequestConfig, AxiosResponse} from 'axios'; export interface CollectorOptions { collectRequests?: number; @@ -44,8 +44,8 @@ export interface ApiMethodParams { concurrentId?: string; collectRequest?: boolean; timeout?: number; - headers?: AxiosRequestHeaders; - requestConfig?: Record; + headers?: AxiosRequestConfig['headers']; + requestConfig?: AxiosRequestConfig; onDownloadProgress?: AxiosRequestConfig['onDownloadProgress']; }; }