MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / headersToObject

Function headersToObject

services/cloud-agent-next/test/e2e/callback-server.ts:58–65  ·  view source on GitHub ↗
(headers: IncomingMessage['headers'])

Source from the content-addressed store, hash-verified

56}
57
58function headersToObject(headers: IncomingMessage['headers']): Record<string, string> {
59 const out: Record<string, string> = {};
60 for (const [key, value] of Object.entries(headers)) {
61 if (value === undefined) continue;
62 out[key] = Array.isArray(value) ? value.join(',') : value;
63 }
64 return out;
65}
66
67export async function startCallbackServer(opts?: { host?: string }): Promise<CallbackServerHandle> {
68 const host = opts?.host ?? '127.0.0.1';

Callers 1

startCallbackServerFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected