MCPcopy
hub / github.com/BuilderIO/agent-native / get

Function get

packages/core/src/a2a/handlers.ts:54–61  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

52 try {
53 const headers = event?.node?.req?.headers ?? event?.headers;
54 const get = (name: string): string | undefined => {
55 if (!headers) return undefined;
56 if (typeof headers.get === "function") {
57 return headers.get(name) ?? undefined;
58 }
59 const map = headers as Record<string, string | undefined>;
60 return map[name] ?? map[String(name).toLowerCase()];
61 };
62 const proto = get("x-forwarded-proto") || "http";
63 const host = get("host") || `localhost:${process.env.PORT || 3000}`;
64 return withConfiguredAppBasePath(`${proto}://${host}`);

Callers 1

resolveSelfBaseUrlFunction · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected