Skip to content

Commit 8edff12

Browse files
committed
allow passing custom headers (#143)
1 parent a514e8d commit 8edff12

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilnfi/sdk",
3-
"version": "3.1.7",
3+
"version": "3.1.8",
44
"autor": "Kiln <[email protected]> (https://kiln.fi)",
55
"license": "BUSL-1.1",
66
"description": "JavaScript sdk for Kiln API",

src/kiln.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ export class Kiln {
1919
const client = createClient<paths>({
2020
...clientOptions,
2121
baseUrl,
22-
headers: apiToken ? { Authorization: `Bearer ${apiToken}` } : {},
22+
headers: {
23+
...(apiToken ? { Authorization: `Bearer ${apiToken}` } : {}),
24+
...clientOptions?.headers,
25+
},
2326
querySerializer: { array: { explode: false, style: 'form' } },
2427
});
2528
this.fireblocks = new FireblocksService(client);

0 commit comments

Comments
 (0)