fix(httpclient): pass query params as object for smartrequest compatibility
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-07-25 - 4.1.1 - fix(httpclient)
|
||||||
|
Fix query parameter handling for smartrequest compatibility
|
||||||
|
|
||||||
|
- Changed query parameter handling to pass objects directly instead of URLSearchParams
|
||||||
|
- Removed URLSearchParams usage and string conversion
|
||||||
|
- Now passes queryParams as an object to smartrequest which handles URL encoding internally
|
||||||
|
|
||||||
## 2025-07-25 - 4.1.0 - feat(transactions)
|
## 2025-07-25 - 4.1.0 - feat(transactions)
|
||||||
Enhanced transaction pagination support with full control over historical data retrieval
|
Enhanced transaction pagination support with full control over historical data retrieval
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiclient.xyz/bunq",
|
"name": "@apiclient.xyz/bunq",
|
||||||
"version": "4.1.0",
|
"version": "4.1.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A full-featured TypeScript/JavaScript client for the bunq API",
|
"description": "A full-featured TypeScript/JavaScript client for the bunq API",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@@ -53,13 +53,13 @@ export class BunqHttpClient {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (options.params) {
|
if (options.params) {
|
||||||
const params = new URLSearchParams();
|
const queryParams: { [key: string]: string } = {};
|
||||||
Object.entries(options.params).forEach(([key, value]) => {
|
Object.entries(options.params).forEach(([key, value]) => {
|
||||||
if (value !== undefined && value !== null) {
|
if (value !== undefined && value !== null) {
|
||||||
params.append(key, String(value));
|
queryParams[key] = String(value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
requestOptions.queryParams = params.toString();
|
requestOptions.queryParams = queryParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user