MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / fetch

Function fetch

services/cloud-agent-next/src/server.ts:520–530  ·  view source on GitHub ↗
(request: Request, env: Env, ctx: ExecutionContext)

Source from the content-addressed store, hash-verified

518
519function createSanitizedForwardRequest(
520 request: Request,
521 url: string | URL,
522 headers: Headers,
523 body?: BodyInit
524): Request {
525 const init: RequestInit & { duplex?: 'half' } = {
526 method: request.method,
527 headers,
528 };
529 if ((body !== undefined || request.body) && requestMethodAllowsBody(request.method)) {
530 init.body = body ?? request.body;
531 init.duplex = 'half';
532 }
533 return new Request(url, init);

Callers 7

fetchWithTimeoutFunction · 0.70
forwardRedeemedRequestFunction · 0.70
handleManagedScmOutboundFunction · 0.70
validateBalanceOnlyFunction · 0.70
updateDBStatusMethod · 0.50
deliverToTargetFunction · 0.50
fetchCommandsFunction · 0.50

Calls 3

handleTerminalWebSocketFunction · 0.85
getMethod · 0.65
fetchMethod · 0.65

Tested by

no test coverage detected