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

Method constructor

docs/examples/proxy/proxy.js:39–50  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

37
38class HTTPHandler {
39 constructor (ctx) {
40 const { req, res, proxyName } = ctx
41
42 this.proxyName = proxyName
43 this.req = req
44 this.res = res
45 this.resume = null
46 this.abort = null
47 this.promise = new Promise((resolve, reject) => {
48 this.callback = err => err ? reject(err) : resolve()
49 })
50 }
51
52 onRequestStart (controller) {
53 if (this.req.aborted) {

Callers

nothing calls this directly

Calls 2

rejectFunction · 0.85
resolveFunction · 0.85

Tested by

no test coverage detected