mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
fix(ts-fetch): preserve available headers (#5650)
This commit is contained in:
parent
6fa4853fe7
commit
d210236040
@ -116,11 +116,11 @@ export const {{classname}}FetchParamCreator = {
|
||||
{{#hasHeaderParams}}
|
||||
fetchOptions.headers = {{#supportsES6}}Object.{{/supportsES6}}assign({
|
||||
{{#headerParams}}"{{baseName}}": params["{{paramName}}"],{{/headerParams}}
|
||||
}, contentTypeHeader);
|
||||
}, contentTypeHeader, fetchOptions.headers);
|
||||
{{/hasHeaderParams}}
|
||||
{{^hasHeaderParams}}
|
||||
if (contentTypeHeader) {
|
||||
fetchOptions.headers = contentTypeHeader;
|
||||
fetchOptions.headers = {{#supportsES6}}Object.{{/supportsES6}}assign({}, contentTypeHeader, fetchOptions.headers);
|
||||
}
|
||||
{{/hasHeaderParams}}
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user