Skip to content

Commit

Permalink
update js samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Oct 31, 2024
1 parent 36d031d commit 15c27e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion samples/client/petstore/javascript-es6/src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ class ApiClient {
}

if (contentType === 'application/x-www-form-urlencoded') {
request.send(querystring.stringify(this.normalizeParams(formParams)));
let queryString = querystring.stringify(this.normalizeParams(formParams));
request.send(queryString);
} else if (contentType == 'multipart/form-data') {
var _formParams = this.normalizeParams(formParams);
for (var key in _formParams) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ class ApiClient {
}

if (contentType === 'application/x-www-form-urlencoded') {
request.send(querystring.stringify(this.normalizeParams(formParams)));
let queryString = querystring.stringify(this.normalizeParams(formParams));
request.send(queryString);
} else if (contentType == 'multipart/form-data') {
var _formParams = this.normalizeParams(formParams);
for (var key in _formParams) {
Expand Down

0 comments on commit 15c27e4

Please sign in to comment.