Skip to content

Commit

Permalink
header fix
Browse files Browse the repository at this point in the history
  • Loading branch information
egandro committed Jul 5, 2017
1 parent fa39fc7 commit 09ef638
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/generator/angular.client/templates/services.ts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class <%- ctrl.name%>Service {
const headers: Headers = new Headers();
headers.append('Content-Type', 'application/json');
headers.append('Accept', 'application/json');
headers.append('Accept-Encoding', 'gzip, deflate, compress');
// headers.append('Accept-Encoding', 'gzip, deflate, compress');
if(Configuration.customHeaders != null ||
Configuration.customHeaders !== undefined) {
Expand Down Expand Up @@ -136,7 +136,7 @@ if(method.hasParameterType('path')) {
_headers.append('x-access-token', Configuration.token);
%><%
}%>
return this.__http.<%- method.verb%>(__url<%if(needBody) {%>, _body<%}%>, _headers)
return this.__http.<%- method.verb%>(__url<%if(needBody) {%>, _body<%}%>, { headers: _headers } )
.map((response: Response) => <<%- resultTypeHttp %>> ( <%
if(resultTypeIsPrimitive){
%><any>response.json()<%
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nicassa-generator",
"description": "CLI based code generator for Sequelize, Node, Typescript, Angular 2, Android, Swagger, ORM Lite",
"version": "0.0.34",
"version": "0.0.35",
"author": "Harald Fielker <[email protected]>",
"repository": {
"type": "git",
Expand Down

0 comments on commit 09ef638

Please sign in to comment.