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

Function onData

deps/undici/undici.js:9145–9154  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

9143 }
9144 __name(releaseRequestStream, "releaseRequestStream");
9145 function onData(chunk) {
9146 const stream = this;
9147 const { request } = stream[kRequestStreamState];
9148 if (request.aborted || request.completed) {
9149 return;
9150 }
9151 if (request.onResponseData(chunk) === false) {
9152 stream.pause();
9153 }
9154 }
9155 __name(onData, "onData");
9156 function onResponse(headers) {
9157 const stream = this;

Callers

nothing calls this directly

Calls 2

onResponseDataMethod · 0.65
pauseMethod · 0.65

Tested by

no test coverage detected