-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I use a proxy like in axios? #526
Comments
If this is about Node.js, https://github.com/gajus/global-agent is usually the go to tool for this, unfortunately, it doesn't yet support: gajus/global-agent#52 Proxy support is not something we plan to or can support built-in here. |
From what I've found, the easiest way to use a proxy with Node.js
import { EnvHttpProxyAgent } from 'undici'
import ky from 'ky'
const kyWithProxy = ky.extend({ dispatcher: new EnvHttpProxyAgent() }) This obviously won't work outside of Node.js, but it's still useful to know about. |
## [5.0.1](v5.0.0...v5.0.1) (2024-12-10) ### Bug Fixes * **ms-teams:** use undici experimental EnvHttpProxyAgent for proxies ([44e2811](44e2811)), closes [/github.com/sindresorhus/ky/issues/526#issuecomment-2390430300](https://github.com//github.com/sindresorhus/ky/issues/526/issues/issuecomment-2390430300)
Thanks
The text was updated successfully, but these errors were encountered: