mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Replacing progress with onUploadProgress and onDownloadProgress in TypeScript definitions
This commit is contained in:
Vendored
+2
-1
@@ -28,7 +28,8 @@ export interface AxiosRequestConfig {
|
|||||||
responseType?: string;
|
responseType?: string;
|
||||||
xsrfCookieName?: string;
|
xsrfCookieName?: string;
|
||||||
xsrfHeaderName?: string;
|
xsrfHeaderName?: string;
|
||||||
progress?: (progressEvent: any) => void;
|
onUploadProgress?: (progressEvent: any) => void;
|
||||||
|
onDownloadProgress?: (progressEvent: any) => void;
|
||||||
maxContentLength?: number;
|
maxContentLength?: number;
|
||||||
validateStatus?: (status: number) => boolean;
|
validateStatus?: (status: number) => boolean;
|
||||||
maxRedirects?: number;
|
maxRedirects?: number;
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ const config: AxiosRequestConfig = {
|
|||||||
responseType: 'json',
|
responseType: 'json',
|
||||||
xsrfCookieName: 'XSRF-TOKEN',
|
xsrfCookieName: 'XSRF-TOKEN',
|
||||||
xsrfHeaderName: 'X-XSRF-TOKEN',
|
xsrfHeaderName: 'X-XSRF-TOKEN',
|
||||||
progress: (progressEvent: any) => {},
|
onUploadProgress: (progressEvent: any) => {},
|
||||||
|
onDownloadProgress: (progressEvent: any) => {},
|
||||||
maxContentLength: 2000,
|
maxContentLength: 2000,
|
||||||
validateStatus: (status: number) => status >= 200 && status < 300,
|
validateStatus: (status: number) => status >= 200 && status < 300,
|
||||||
maxRedirects: 5
|
maxRedirects: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user