We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9913850 commit 06ea2ddCopy full SHA for 06ea2dd
src/config.ts
@@ -1,4 +1,4 @@
1
-export function createSmitheryUrl(baseUrl: string, config?: object) {
+export function createSmitheryUrl(baseUrl: string, config?: object, apiKey?: string) {
2
const url = new URL(baseUrl)
3
if (config) {
4
const param =
@@ -7,5 +7,8 @@ export function createSmitheryUrl(baseUrl: string, config?: object) {
7
: Buffer.from(JSON.stringify(config)).toString("base64")
8
url.searchParams.set("config", param)
9
}
10
+ if (apiKey) {
11
+ url.searchParams.set("api_key", apiKey)
12
+ }
13
return url
14
0 commit comments