Skip to content

Commit bf90e82

Browse files
committed
bugfix: Use merged request params to get request content-type
1 parent a013686 commit bf90e82

File tree

26 files changed

+215
-215
lines changed

26 files changed

+215
-215
lines changed

templates/base/http-clients/fetch-http-client.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export class HttpClient<SecurityDataType = unknown> {
183183
...requestParams,
184184
headers: {
185185
...(requestParams.headers || {}),
186-
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
186+
...(requestParams.type && requestParams.type !== ContentType.FormData ? { "Content-Type": requestParams.type } : {}),
187187
},
188188
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
189189
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),

0 commit comments

Comments
 (0)