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

Function tryHandleUploadHttpRoute

src/daemon/upload-http.ts:44–56  ·  view source on GitHub ↗
(params: {
  req: http.IncomingMessage;
  res: http.ServerResponse;
  authorize: AuxiliaryHttpAuthorizer;
  token: string;
})

Source from the content-addressed store, hash-verified

42}) => Promise<{ tenantId?: string } | null>;
43
44export function tryHandleUploadHttpRoute(params: {
45 req: http.IncomingMessage;
46 res: http.ServerResponse;
47 authorize: AuxiliaryHttpAuthorizer;
48 token: string;
49}): boolean {
50 const { req, res, authorize, token } = params;
51 const route = resolveUploadHttpRoute(req);
52 if (route === null) return false;
53
54 void handleUploadHttpRoute(route, req, res, authorize, token);
55 return true;
56}
57
58async function handleUploadHttpRoute(
59 route: UploadHttpRoute,

Callers 1

createDaemonHttpServerFunction · 0.90

Calls 2

resolveUploadHttpRouteFunction · 0.85
handleUploadHttpRouteFunction · 0.85

Tested by

no test coverage detected