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

Method onResponseData

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

Source from the content-addressed store, hash-verified

2973 }
2974 }
2975 onResponseData(chunk) {
2976 assert(!this.aborted);
2977 assert(!this.completed);
2978 if (channels.bodyChunkReceived.hasSubscribers) {
2979 channels.bodyChunkReceived.publish({ request: this, chunk });
2980 }
2981 const controller = this[kController];
2982 try {
2983 this[kHandler].onResponseData?.(controller, chunk);
2984 return !controller?.paused;
2985 } catch (err) {
2986 this.abort(err);
2987 return false;
2988 }
2989 }
2990 onRequestUpgrade(statusCode, headers, socket) {
2991 assert(!this.aborted);
2992 assert(!this.completed);

Callers

nothing calls this directly

Calls 8

onResponseDataMethod · 0.65
abortMethod · 0.65
pauseMethod · 0.65
assertFunction · 0.50
publishMethod · 0.45
onDataMethod · 0.45
pushMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected