This commit is contained in:
2025-07-26 21:54:04 +03:30
parent f720424180
commit 615dc6a033
682 changed files with 6709 additions and 15232 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ function throttle(fn, freq) {
clearTimeout(timer);
timer = null;
}
fn(...args);
fn.apply(null, args);
}
const throttled = (...args) => {
-4
View File
@@ -120,10 +120,6 @@ function toFormData(obj, formData, options) {
return value.toISOString();
}
if (utils.isBoolean(value)) {
return value.toString();
}
if (!useBlob && utils.isBlob(value)) {
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
}
+3 -4
View File
@@ -5,7 +5,7 @@ import toFormData from './toFormData.js';
import platform from '../platform/index.js';
export default function toURLEncodedForm(data, options) {
return toFormData(data, new platform.classes.URLSearchParams(), {
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
visitor: function(value, key, path, helpers) {
if (platform.isNode && utils.isBuffer(value)) {
this.append(key, value.toString('base64'));
@@ -13,7 +13,6 @@ export default function toURLEncodedForm(data, options) {
}
return helpers.defaultVisitor.apply(this, arguments);
},
...options
});
}
}, options));
}