MCPcopy Index your code
hub / github.com/massCodeIO/massCode / applyPathParams

Function applyPathParams

src/main/http/import/opencollection.ts:166–175  ·  view source on GitHub ↗
(
  url: string,
  pathParams: Record<string, string>,
)

Source from the content-addressed store, hash-verified

164}
165
166function applyPathParams(
167 url: string,
168 pathParams: Record<string, string>,
169): string {
170 let nextUrl = url
171 for (const name of Object.keys(pathParams)) {
172 nextUrl = nextUrl.replaceAll(`:${name}`, `{{${name}}}`)
173 }
174 return nextUrl
175}
176
177function parseAuth(
178 rawAuth: unknown,

Callers 1

parseRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected