diff options
Diffstat (limited to 'packages/web-util/src/utils/http-impl.sw.ts')
-rw-r--r-- | packages/web-util/src/utils/http-impl.sw.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/web-util/src/utils/http-impl.sw.ts b/packages/web-util/src/utils/http-impl.sw.ts index 7b168b739..21e328363 100644 --- a/packages/web-util/src/utils/http-impl.sw.ts +++ b/packages/web-util/src/utils/http-impl.sw.ts @@ -99,6 +99,15 @@ export class BrowserFetchHttpLib implements HttpRequestLibrary { }); } + /** + * default header assume everything is json + * in case of formData the content-type will be + * auto generated + */ + if (myBody instanceof FormData) { + delete requestHeadersMap["Content-Type"] + } + const controller = new AbortController(); let timeoutId: ReturnType<typeof setTimeout> | undefined; if (requestTimeout.d_ms !== "forever") { |