mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
URL params serializer; (#4734)
* Refactored BuildURL helper to use URLSearchParams serializer; * Updated typings; Added TS test;
This commit is contained in:
@@ -46,6 +46,10 @@ function isSpecCompliant(thing) {
|
||||
**/
|
||||
|
||||
function toFormData(obj, formData, options) {
|
||||
if (!utils.isObject(obj)) {
|
||||
throw new TypeError('target must be an object');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
formData = formData || new (envFormData || FormData)();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user