Skip to content

Commit 44298c9

Browse files
committed
http: support http proxy for fetch under NODE_USE_ENV_PROXY
1 parent 06d5701 commit 44298c9

File tree

6 files changed

+1338
-4
lines changed

6 files changed

+1338
-4
lines changed

deps/undici/src/index-fetch.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ module.exports.createFastMessageEvent = createFastMessageEvent
2626

2727
module.exports.EventSource = require('./lib/web/eventsource/eventsource').EventSource
2828

29+
const api = require('./lib/api')
30+
const Dispatcher = require('./lib/dispatcher/dispatcher')
31+
Object.assign(Dispatcher.prototype, api)
32+
2933
// Expose the fetch implementation to be enabled in Node.js core via a flag
3034
module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent
3135
module.exports.getGlobalDispatcher = getGlobalDispatcher

0 commit comments

Comments
 (0)