MCPcopy Create free account
hub / github.com/anomalyco/opencode / header

Function header

packages/llm/src/route/auth.ts:121–126  ·  view source on GitHub ↗
(name: string, source?: Secret | Credential)

Source from the content-addressed store, hash-verified

119export function header(name: string): (source: Secret | Credential) => Auth
120export function header(name: string, source: Secret | Credential): Auth
121export function header(name: string, source?: Secret | Credential) {
122 if (source === undefined) {
123 return (next: Secret | Credential) => credentialInput(next).header(name)
124 }
125 return credentialInput(source).header(name)
126}
127
128export function bearerHeader(name: string): (source: Secret | Credential) => Auth
129export function bearerHeader(name: string, source: Secret | Credential): Auth

Callers

nothing calls this directly

Calls 1

credentialInputFunction · 0.85

Tested by

no test coverage detected