Skip to content

Commit

Permalink
feat: pass an API key with the requests
Browse files Browse the repository at this point in the history
  • Loading branch information
kalabukdima committed Jun 6, 2023
1 parent c1b72d8 commit 41109d6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client/streamRegistryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface StreamRegistryOptions {
retryCount: number;
waitInMs: number;
};
apiKey?: string;
}

const DefaultRegistryClientOptions: StreamRegistryOptions = {
Expand All @@ -29,6 +30,7 @@ export class StreamRegistryClient implements StreamRegistry {
baseURL: options.endpoint,
validateStatus: status =>
(status >= 200 && status < 300) || status == 404,
headers: options.apiKey ? { "x-api-key": options.apiKey } : {},
});
}

Expand Down

0 comments on commit 41109d6

Please sign in to comment.