MCPcopy Create free account
hub / github.com/nodejs/undici / onResponseEnd

Method onResponseEnd

lib/api/api-stream.js:208–222  ·  view source on GitHub ↗
(_controller, trailers)

Source from the content-addressed store, hash-verified

206 }
207
208 onResponseEnd (_controller, trailers) {
209 const { res } = this
210
211 removeSignal(this)
212
213 if (!res) {
214 return
215 }
216
217 if (trailers && typeof trailers === 'object') {
218 this.trailers = trailers
219 }
220
221 res.end()
222 }
223
224 onResponseError (_controller, err) {
225 const { res, callback, opaque, body } = this

Callers

nothing calls this directly

Calls 2

removeSignalFunction · 0.85
endMethod · 0.45

Tested by

no test coverage detected