MCPcopy Create free account
hub / github.com/TanStack/ai / readBody

Function readBody

testing/e2e/global-setup.ts:733–740  ·  view source on GitHub ↗
(req: http.IncomingMessage)

Source from the content-addressed store, hash-verified

731}
732
733function readBody(req: http.IncomingMessage): Promise<string> {
734 return new Promise((resolve, reject) => {
735 const chunks: Array<Buffer> = []
736 req.on('data', (c: Buffer) => chunks.push(c))
737 req.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')))
738 req.on('error', reject)
739 })
740}
741
742function drainBody(req: http.IncomingMessage): Promise<void> {
743 return new Promise((resolve, reject) => {

Callers 1

handleRequestFunction · 0.70

Calls 2

toStringMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected