mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Adding better 'responseType' and 'method' type definitions by using a string literal union type of possible values (#1148)
This commit is contained in:
committed by
Justin Beckwith
parent
8e3b50c564
commit
dd16944ecf
Vendored
+2
-2
@@ -22,7 +22,7 @@ export interface AxiosProxyConfig {
|
|||||||
|
|
||||||
export interface AxiosRequestConfig {
|
export interface AxiosRequestConfig {
|
||||||
url?: string;
|
url?: string;
|
||||||
method?: string;
|
method?: 'get' | 'delete' | 'head' | 'options' | 'post' | 'put' | 'patch';
|
||||||
baseURL?: string;
|
baseURL?: string;
|
||||||
transformRequest?: AxiosTransformer | AxiosTransformer[];
|
transformRequest?: AxiosTransformer | AxiosTransformer[];
|
||||||
transformResponse?: AxiosTransformer | AxiosTransformer[];
|
transformResponse?: AxiosTransformer | AxiosTransformer[];
|
||||||
@@ -34,7 +34,7 @@ export interface AxiosRequestConfig {
|
|||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
adapter?: AxiosAdapter;
|
adapter?: AxiosAdapter;
|
||||||
auth?: AxiosBasicCredentials;
|
auth?: AxiosBasicCredentials;
|
||||||
responseType?: string;
|
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
|
||||||
xsrfCookieName?: string;
|
xsrfCookieName?: string;
|
||||||
xsrfHeaderName?: string;
|
xsrfHeaderName?: string;
|
||||||
onUploadProgress?: (progressEvent: any) => void;
|
onUploadProgress?: (progressEvent: any) => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user