mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +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:
+8
-1
@@ -47,7 +47,7 @@ class Axios {
|
||||
|
||||
config = mergeConfig(this.defaults, config);
|
||||
|
||||
const transitional = config.transitional;
|
||||
const {transitional, paramsSerializer} = config;
|
||||
|
||||
if (transitional !== undefined) {
|
||||
validator.assertOptions(transitional, {
|
||||
@@ -57,6 +57,13 @@ class Axios {
|
||||
}, false);
|
||||
}
|
||||
|
||||
if (paramsSerializer !== undefined) {
|
||||
validator.assertOptions(paramsSerializer, {
|
||||
encode: validators.function,
|
||||
serialize: validators.function
|
||||
}, true);
|
||||
}
|
||||
|
||||
// Set config.method
|
||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user