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:
committed by
GitHub
parent
c7e0fea787
commit
5064b108de
@@ -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.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user