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

Function onRequestUpgrade

test/node-test/client-dispatch.js:396–409  ·  view source on GitHub ↗
(_controller, statusCode, _headers, socket)

Source from the content-addressed store, hash-verified

394 t.ok(true, 'should not throw')
395 },
396 onRequestUpgrade (_controller, statusCode, _headers, socket) {
397 p.strictEqual(count++, 0)
398
399 socket.on('data', (d) => {
400 recvData += d
401 })
402
403 socket.on('end', () => {
404 p.strictEqual(recvData.toString(), 'Body')
405 })
406
407 socket.write('Body')
408 socket.end()
409 },
410 onResponseData (_controller, buf) {
411 p.ok(0)
412 },

Callers

nothing calls this directly

Calls 4

onMethod · 0.45
toStringMethod · 0.45
writeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected