MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / joinUrl

Function joinUrl

src/services/api/openaiCompatibleClient.ts:113–120  ·  view source on GitHub ↗
(baseUrl: string, path: string)

Source from the content-addressed store, hash-verified

111}
112
113function joinUrl(baseUrl: string, path: string): string {
114 const url = new URL(baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`)
115 url.pathname = `${url.pathname.replace(/\/?$/, '/')}${path}`.replace(
116 /\/+/g,
117 '/',
118 )
119 return url.toString()
120}
121
122function getRequestId(headers: Headers): null | string {
123 return (

Callers 1

createFunction · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected