Skip to content

Commit

Permalink
Merge pull request OpenAPITools#2864 from revaultch/master
Browse files Browse the repository at this point in the history
typescript-angular2 query string fix
  • Loading branch information
wing328 committed May 23, 2016
2 parents 8ba19f0 + 91177cd commit 9b9d585
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class {{classname}} {
const path = this.basePath + '{{path}}'{{#pathParams}}
.replace('{' + '{{baseName}}' + '}', String({{paramName}})){{/pathParams}};

let queryParameters: any = ""; // This should probably be an object in the future
let queryParameters = new URLSearchParams();
let headerParams = this.defaultHeaders;
{{#hasFormParams}}
let formParams = new URLSearchParams();
Expand All @@ -51,7 +51,7 @@ export class {{classname}} {
{{/allParams}}
{{#queryParams}}
if ({{paramName}} !== undefined) {
queryParameters['{{baseName}}'] = {{paramName}};
queryParameters.set('{{baseName}}', {{paramName}});
}

{{/queryParams}}
Expand Down

0 comments on commit 9b9d585

Please sign in to comment.