Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dayjs": "^1.11.9",
"https-proxy-agent": "^5.0.0",
"jsonwebtoken": "^9.0.2",
"qs": "^6.9.4",
"picoquery": "^1.0.0",
"scmp": "^2.1.0",
"xmlbuilder": "^13.0.2"
},
Expand All @@ -34,7 +34,6 @@
"@types/jest": "^29.5.5",
"@types/jsonwebtoken": "^9.0.2",
"@types/node": "^18.11.18",
"@types/qs": "^6.9.7",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"eslint": "^8.31.0",
"express": "^4.17.1",
Expand All @@ -45,8 +44,8 @@
"node-mocks-http": "^1.8.1",
"prettier": "^2.7.1",
"ts-jest": "^29.1.1",
"typescript": "^4.7.2",
"typedoc": "^0.23.21"
"typedoc": "^0.23.21",
"typescript": "^4.7.2"
},
"scripts": {
"test": "npm run test:javascript && npm run test:typescript",
Expand Down
6 changes: 3 additions & 3 deletions src/base/RequestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HttpMethod } from "../interfaces";
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
import * as fs from "fs";
import HttpsProxyAgent from "https-proxy-agent";
import qs from "qs";
import * as pq from "picoquery";
import * as https from "https";
import Response from "../http/response";
import Request, {
Expand Down Expand Up @@ -194,7 +194,7 @@ class RequestClient {
if (
options.headers["Content-Type"] === "application/x-www-form-urlencoded"
) {
options.data = qs.stringify(opts.data, { arrayFormat: "repeat" });
options.data = pq.stringify(opts.data, { arrayRepeat: true, arrayRepeatSyntax: "repeat" });
} else if (options.headers["Content-Type"] === "application/json") {
options.data = opts.data;
}
Expand All @@ -203,7 +203,7 @@ class RequestClient {
if (opts.params) {
options.params = opts.params;
options.paramsSerializer = (params) => {
return qs.stringify(params, { arrayFormat: "repeat" });
return pq.stringify(params, { arrayRepeat: true, arrayRepeatSyntax: "repeat" });
};
}

Expand Down