mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
fix(form-data): convert boolean values to strings in FormData serialization (#6917)
This commit is contained in:
committed by
GitHub
parent
c7e0fea787
commit
5064b108de
@@ -120,6 +120,10 @@ function toFormData(obj, formData, options) {
|
|||||||
return value.toISOString();
|
return value.toISOString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (utils.isBoolean(value)) {
|
||||||
|
return value.toString();
|
||||||
|
}
|
||||||
|
|
||||||
if (!useBlob && utils.isBlob(value)) {
|
if (!useBlob && utils.isBlob(value)) {
|
||||||
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user