MCPcopy Index your code
hub / github.com/callstack/agent-device / buildDaemonHttpUrl

Function buildDaemonHttpUrl

src/daemon/http-contract.ts:7–10  ·  view source on GitHub ↗
(baseUrl: string, route: string)

Source from the content-addressed store, hash-verified

5}
6
7export function buildDaemonHttpUrl(baseUrl: string, route: string): string {
8 const normalizedBase = baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`;
9 return new URL(route.replace(/^\/+/, ''), normalizedBase).toString();
10}
11
12export function buildDaemonHttpAuthHeaders(token: string | undefined): Record<string, string> {
13 const normalizedToken = token?.trim();

Callers 6

readUpstreamHealthFunction · 0.90
buildUpstreamUrlFunction · 0.90
readDaemonHttpHealthFunction · 0.90
sendHttpRequestFunction · 0.90
buildDaemonHttpBaseUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected