fix(httpclient): pass query params as object for smartrequest compatibility
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# 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)
|
||||
Enhanced transaction pagination support with full control over historical data retrieval
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@apiclient.xyz/bunq",
|
||||
"version": "4.1.0",
|
||||
"version": "4.1.1",
|
||||
"private": false,
|
||||
"description": "A full-featured TypeScript/JavaScript client for the bunq API",
|
||||
"type": "module",
|
||||
|
@@ -53,13 +53,13 @@ export class BunqHttpClient {
|
||||
};
|
||||
|
||||
if (options.params) {
|
||||
const params = new URLSearchParams();
|
||||
const queryParams: { [key: string]: string } = {};
|
||||
Object.entries(options.params).forEach(([key, value]) => {
|
||||
if (value !== undefined && value !== null) {
|
||||
params.append(key, String(value));
|
||||
queryParams[key] = String(value);
|
||||
}
|
||||
});
|
||||
requestOptions.queryParams = params.toString();
|
||||
requestOptions.queryParams = queryParams;
|
||||
}
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user