forked from loafle/openapi-generator-original
[JS] set option to true by default, update samples (#20003)
* set option to true by default, update samples * update doc
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
|
||||
|
||||
import superagent from "superagent";
|
||||
import querystring from "querystring";
|
||||
|
||||
/**
|
||||
* @module ApiClient
|
||||
@@ -443,7 +442,10 @@ class ApiClient {
|
||||
}
|
||||
|
||||
if (contentType === 'application/x-www-form-urlencoded') {
|
||||
request.send(querystring.stringify(this.normalizeParams(formParams)));
|
||||
let normalizedParams = this.normalizeParams(formParams)
|
||||
let urlSearchParams = new URLSearchParams(normalizedParams);
|
||||
let queryString = urlSearchParams.toString();
|
||||
request.send(queryString);
|
||||
} else if (contentType == 'multipart/form-data') {
|
||||
var _formParams = this.normalizeParams(formParams);
|
||||
for (var key in _formParams) {
|
||||
|
||||
Reference in New Issue
Block a user