diff --git a/src/main/resources/handlebars/typescript-angular/api.service.mustache b/src/main/resources/handlebars/typescript-angular/api.service.mustache index 167ddf80fb..457b5a5a20 100644 --- a/src/main/resources/handlebars/typescript-angular/api.service.mustache +++ b/src/main/resources/handlebars/typescript-angular/api.service.mustache @@ -248,7 +248,7 @@ export class {{classname}} { {{/produces}} ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if ((httpHeaderAcceptSelected != undefined) && (headers.get('Accept') == undefined)) { {{^useHttpClient}} headers.set('Accept', httpHeaderAcceptSelected); {{/useHttpClient}}