mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
fix(params): re-added the ability to set the function as paramsSerializer config; (#5633)
This commit is contained in:
+11
-5
@@ -57,11 +57,17 @@ class Axios {
|
||||
}, false);
|
||||
}
|
||||
|
||||
if (paramsSerializer !== undefined) {
|
||||
validator.assertOptions(paramsSerializer, {
|
||||
encode: validators.function,
|
||||
serialize: validators.function
|
||||
}, true);
|
||||
if (paramsSerializer != null) {
|
||||
if (utils.isFunction(paramsSerializer)) {
|
||||
config.paramsSerializer = {
|
||||
serialize: paramsSerializer
|
||||
}
|
||||
} else {
|
||||
validator.assertOptions(paramsSerializer, {
|
||||
encode: validators.function,
|
||||
serialize: validators.function
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Set config.method
|
||||
|
||||
Reference in New Issue
Block a user