MCPcopy
hub / github.com/di-sukharev/opencommit / discardResponseBody

Function discardResponseBody

out/cli.cjs:34599–34614  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

34597 return out;
34598 }
34599 async function discardResponseBody(res) {
34600 var _a5;
34601 const reader = (_a5 = res.body) === null || _a5 === void 0 ? void 0 : _a5.getReader();
34602 if (reader == null) {
34603 return;
34604 }
34605 try {
34606 let done = false;
34607 while (!done) {
34608 const res2 = await reader.read();
34609 done = res2.done;
34610 }
34611 } finally {
34612 reader.releaseLock();
34613 }
34614 }
34615 }
34616});
34617

Callers 1

matchFunction · 0.85

Calls 3

getReaderMethod · 0.45
readMethod · 0.45
releaseLockMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…