MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / endpointUrlFromAction

Function endpointUrlFromAction

lib/edge-runtime/requests.ts:187–198  ·  view source on GitHub ↗
(action: {
  api_host: string;
  path: string;
})

Source from the content-addressed store, hash-verified

185}
186
187export function endpointUrlFromAction(action: {
188 api_host: string;
189 path: string;
190}): string {
191 // Ensure the base URL has a trailing slash
192 const base = action.api_host.endsWith("/")
193 ? action.api_host
194 : `${action.api_host}/`;
195 // Ensure the action path does not have a leading slash
196 const path = action.path.startsWith("/") ? action.path.slice(1) : action.path;
197 return base + path;
198}
199
200export function bodyPropertiesFromRequestBodyContents(
201 requestBodyContents: Json,

Callers 2

requests.test.tsFile · 0.90
constructHttpRequestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected