mirror of
https://github.com/tenrok/axios.git
synced 2026-06-02 16:04:10 +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 {
|
||||
url?: string;
|
||||
method?: string;
|
||||
method?: 'get' | 'delete' | 'head' | 'options' | 'post' | 'put' | 'patch';
|
||||
baseURL?: string;
|
||||
transformRequest?: AxiosTransformer | AxiosTransformer[];
|
||||
transformResponse?: AxiosTransformer | AxiosTransformer[];
|
||||
@@ -34,7 +34,7 @@ export interface AxiosRequestConfig {
|
||||
withCredentials?: boolean;
|
||||
adapter?: AxiosAdapter;
|
||||
auth?: AxiosBasicCredentials;
|
||||
responseType?: string;
|
||||
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
|
||||
xsrfCookieName?: string;
|
||||
xsrfHeaderName?: string;
|
||||
onUploadProgress?: (progressEvent: any) => void;
|
||||
|
||||
Reference in New Issue
Block a user