You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
, we create a new Agent for every ProxyAgent. I think we should make ProxyAgent take an instance of Agent as an option, making something like the following possible:
import{ProxyAgent,request,setGlobalDispatcher}from"undici"import{CookieAgent}from"http-cookie-agent/undici"import{CookieJar}from"tough-cookie"asyncfunctiontest(){constproxyAgent=newProxyAgent("http://127.0.0.1:10810")setGlobalDispatcher(proxyAgent)constjar=newCookieJar()constagent=newCookieAgent({cookies: { jar }})awaitrequest("https://test.com",{dispatcher: agent,})}
In
undici/lib/proxy-agent.js
Line 41 in 0beedf9
Agent
for everyProxyAgent
. I think we should makeProxyAgent
take an instance ofAgent
as an option, making something like the following possible:Help would be greatly appreciated! 🙏
Originally posted by @tgioer in #1957
The text was updated successfully, but these errors were encountered: