Skip to content

Commit ea6fe99

Browse files
authored
Merge pull request joltup#213 from pierre275/android/fix-fetch-polyfill
Fix support of FormData in Fetch polyfill on android
2 parents 8be38f8 + 6aaa260 commit ea6fe99

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

polyfill/Fetch.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ class ReactNativeBlobUtilFetchPolyfill {
4040
log.verbose('convert FormData to blob body');
4141
promise = Blob.build(body).then((b) => {
4242
blobCache = b;
43-
options.headers['Content-Type'] = 'multipart/form-data;boundary=' + b.multipartBoundary;
43+
44+
const contentType = 'multipart/form-data;boundary=' + b.multipartBoundary
45+
options.headers['Content-Type'] = contentType;
46+
options.headers['content-type'] = contentType;
4447
return Promise.resolve(URIUtil.wrap(b._ref));
4548
});
4649
}

0 commit comments

Comments
 (0)