MCPcopy Create free account
hub / github.com/EvoMap/evolver / readBody

Function readBody

test/atpProxyRouting.test.js:31–41  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

29}
30
31function readBody(req) {
32 return new Promise((resolve) => {
33 const chunks = [];
34 req.on('data', (c) => chunks.push(c));
35 req.on('end', () => {
36 const raw = Buffer.concat(chunks).toString();
37 try { resolve(raw ? JSON.parse(raw) : {}); }
38 catch { resolve({ raw }); }
39 });
40 });
41}
42
43describe('ATP hubClient proxy routing (regression #460 Bug 2)', () => {
44 let proxyServer;

Callers 1

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected