MCPcopy Create free account
hub / github.com/Noumena-Network/code / headersJson

Function headersJson

src/services/api/openAICompatWsV2Native.ts:111–117  ·  view source on GitHub ↗
(headers: Headers)

Source from the content-addressed store, hash-verified

109}
110
111function headersJson(headers: Headers): string {
112 const values: Record<string, string> = {}
113 for (const [key, value] of headers.entries()) {
114 values[key] = value
115 }
116 return JSON.stringify(values)
117}
118
119function encodeSseFrame(data: string): Uint8Array {
120 return new TextEncoder().encode(`data: ${data}\n\n`)

Callers 1

Calls 1

entriesMethod · 0.80

Tested by

no test coverage detected