2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

feat: added custom params serializer support; (#5113)

* Added custom params serializer support;

* Added missed semicolon;
Fixed allowUnknown option;

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Dmitriy Mozgovoy
2022-10-13 23:12:10 +03:00
committed by GitHub
parent ed19414b33
commit 9d4b016dde
5 changed files with 44 additions and 7 deletions
Vendored
+5
View File
@@ -247,8 +247,13 @@ export interface ParamEncoder {
(value: any, defaultEncoder: (value: any) => any): any;
}
export interface CustomParamsSerializer {
(params: object, options?: ParamsSerializerOptions): string;
}
export interface ParamsSerializerOptions extends SerializerOptions {
encode?: ParamEncoder;
serialize?: CustomParamsSerializer;
}
type MaxUploadRate = number;