MCPcopy Create free account
hub / github.com/callstack/agent-device / sendRewrittenUploadPreflightResponse

Function sendRewrittenUploadPreflightResponse

src/remote/daemon-proxy.ts:159–169  ·  view source on GitHub ↗
(params: {
  req: IncomingMessage;
  res: ServerResponse;
  response: Response;
  clientToken: string;
})

Source from the content-addressed store, hash-verified

157}
158
159async function sendRewrittenUploadPreflightResponse(params: {
160 req: IncomingMessage;
161 res: ServerResponse;
162 response: Response;
163 clientToken: string;
164}): Promise<void> {
165 const { req, res, response, clientToken } = params;
166 const text = await response.text();
167 res.setHeader('content-type', response.headers.get('content-type') ?? 'application/json');
168 res.end(rewriteUploadPreflightResponse(text, req, clientToken));
169}
170
171function rewriteUploadPreflightResponse(
172 body: string,

Callers 1

sendProxyResponseFunction · 0.85

Calls 2

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…