diff --git a/src/client.ts b/src/client.ts index 4578a8df..780611f5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -156,7 +156,7 @@ export class StreamClient> | null; browser: boolean; node: boolean; @@ -237,7 +237,10 @@ export class StreamClient = { + api_key: this.apiKey, + ...(kwargs.qs || {}), + }; + + if (this.group) { + params.location = this.group; + } + return { method, url: this.enrichUrl(kwargs.url, kwargs.serviceName), data: kwargs.body, - params: { - api_key: this.apiKey, - location: this.group, - ...(kwargs.qs || {}), - }, + params, headers: { 'X-Stream-Client': this.userAgent(), 'stream-auth-type': 'jwt',