diff --git a/templates/default/http-client.eta b/templates/default/http-client.eta index d8dc2aab..62b313d6 100644 --- a/templates/default/http-client.eta +++ b/templates/default/http-client.eta @@ -171,7 +171,7 @@ export class HttpClient { { ...requestParams, headers: { - ...(type ? { "Content-Type": type } : {}), + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), ...(requestParams.headers || {}), }, signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0, diff --git a/templates/modular/http-client.eta b/templates/modular/http-client.eta index 900ae89c..3d2a644c 100644 --- a/templates/modular/http-client.eta +++ b/templates/modular/http-client.eta @@ -171,7 +171,7 @@ export class HttpClient { { ...requestParams, headers: { - ...(type ? { "Content-Type": type } : {}), + ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), ...(requestParams.headers || {}), }, signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,