Skip to content

Commit a699a85

Browse files
committed
Mark JSON form data as application/json
1 parent 59254d9 commit a699a85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/templates/core/functions/getFormData.hbs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ const getFormData = (options: ApiRequestOptions): FormData | undefined => {
66
if (isString(value) || isBlob(value)) {
77
formData.append(key, value);
88
} else {
9-
formData.append(key, JSON.stringify(value));
9+
formData.append(
10+
key,
11+
new Blob([JSON.stringify(value)], { type: 'application/json' })
12+
);
1013
}
1114
};
1215

0 commit comments

Comments
 (0)