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
Since that is only used in async connect(), making that asynchronous shouldn't be too onerous; for backwards compatibility, it should be possible to:
Make it type GetProxyForUrlCallback = (url: string) => string | Promise<string>;
Change the single call site to const proxy = await Promise.resolve(this.getProxyForUrl(url));
Please let me know if that seems reasonable and I can attempt to whip up a PR. (If you think that it would be easier to implement the feature directly, that's excellent too.)
Thanks!
The text was updated successfully, but these errors were encountered:
(This request is for
proxy-agent
)Currently,
GetProxyForUrlCallback
returns a string synchronously:proxy-agents/packages/proxy-agent/src/index.ts
Line 25 in dd3b98f
However, it may be necessary to resolve it asynchronously; for example
Electron.Session.resolveProxy(url)
returns aPromise<string>
.Since that is only used in
async connect()
, making that asynchronous shouldn't be too onerous; for backwards compatibility, it should be possible to:type GetProxyForUrlCallback = (url: string) => string | Promise<string>;
const proxy = await Promise.resolve(this.getProxyForUrl(url));
Please let me know if that seems reasonable and I can attempt to whip up a PR. (If you think that it would be easier to implement the feature directly, that's excellent too.)
Thanks!
The text was updated successfully, but these errors were encountered: