MCPcopy Create free account
hub / github.com/nodejs/node / fullyReadBody

Function fullyReadBody

deps/undici/undici.js:5744–5753  ·  view source on GitHub ↗
(body, processBody, processBodyError)

Source from the content-addressed store, hash-verified

5742 }
5743 __name(iteratorMixin, "iteratorMixin");
5744 function fullyReadBody(body, processBody, processBodyError) {
5745 const successSteps = processBody;
5746 const errorSteps = processBodyError;
5747 try {
5748 const reader = body.stream.getReader();
5749 readAllBytes(reader, successSteps, errorSteps);
5750 } catch (e) {
5751 errorSteps(e);
5752 }
5753 }
5754 __name(fullyReadBody, "fullyReadBody");
5755 function readableStreamClose(controller) {
5756 try {

Callers 2

consumeBodyFunction · 0.70
mainFetchFunction · 0.70

Calls 2

getReaderMethod · 0.80
readAllBytesFunction · 0.70

Tested by

no test coverage detected