MCPcopy
hub / github.com/ecyrbe/zodios / pluginApiKey

Function pluginApiKey

examples/dev.to/api-key-plugin.ts:9–21  ·  view source on GitHub ↗
(provider: ApiKeyPluginConfig)

Source from the content-addressed store, hash-verified

7}
8
9export function pluginApiKey(provider: ApiKeyPluginConfig): ZodiosPlugin {
10 return {
11 request: async (_, config) => {
12 return {
13 ...config,
14 headers: {
15 ...config.headers,
16 "api-key": await provider.getApiKey(),
17 },
18 };
19 },
20 };
21}

Callers 1

example.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected