2
0
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:
Shane Fitzpatrick
2018-04-08 00:19:46 -07:00
committed by Justin Beckwith
parent 8e3b50c564
commit dd16944ecf
Vendored
+2 -2
View File
@@ -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;