mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Add independent maxBodyLength option (#2781)
* Add independent option to set the maximum size of the request body * Remove maxBodyLength check * Update README * Assert for error code and message
This commit is contained in:
Vendored
+7
-6
@@ -32,12 +32,12 @@ export type Method =
|
||||
| 'link' | 'LINK'
|
||||
| 'unlink' | 'UNLINK'
|
||||
|
||||
export type ResponseType =
|
||||
| 'arraybuffer'
|
||||
| 'blob'
|
||||
| 'document'
|
||||
| 'json'
|
||||
| 'text'
|
||||
export type ResponseType =
|
||||
| 'arraybuffer'
|
||||
| 'blob'
|
||||
| 'document'
|
||||
| 'json'
|
||||
| 'text'
|
||||
| 'stream'
|
||||
|
||||
export interface AxiosRequestConfig {
|
||||
@@ -61,6 +61,7 @@ export interface AxiosRequestConfig {
|
||||
onUploadProgress?: (progressEvent: any) => void;
|
||||
onDownloadProgress?: (progressEvent: any) => void;
|
||||
maxContentLength?: number;
|
||||
maxBodyLength?: number;
|
||||
validateStatus?: (status: number) => boolean;
|
||||
maxRedirects?: number;
|
||||
socketPath?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user