adds default headers

This commit is contained in:
aersamkull 2015-10-29 09:15:18 +01:00
parent 4ed819c4a0
commit 2b24aa8f91

View File

@ -13,6 +13,7 @@ namespace {{package}} {
{{/description}} {{/description}}
export class {{classname}} { export class {{classname}} {
private basePath = '{{basePath}}'; private basePath = '{{basePath}}';
public defaultHeaders : any = {};
static $inject: string[] = ['$http', '$httpParamSerializer']; static $inject: string[] = ['$http', '$httpParamSerializer'];
@ -31,7 +32,7 @@ namespace {{package}} {
{{/pathParams}} {{/pathParams}}
let queryParameters: any = {}; let queryParameters: any = {};
let headerParams: any = {}; let headerParams: any = this.defaultHeaders;
{{#hasFormParams}} {{#hasFormParams}}
let formParams: any = {}; let formParams: any = {};