2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

fix(form-data): convert boolean values to strings in FormData serialization (#6917)

This commit is contained in:
Dimitrios Lazanas
2025-05-21 18:32:38 +03:00
committed by GitHub
parent c7e0fea787
commit 5064b108de
+4
View File
@@ -120,6 +120,10 @@ 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.');
}