-
Notifications
You must be signed in to change notification settings - Fork 129
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
the HTTP(S) Agent invalid #379
Comments
Same |
Same for me, reproduction here:
Originally posted by @289997171 in nuxt/nuxt#24799 (comment) |
In addition to this, there is no types for Edit this has been reported here |
Could it be because So you can try this. import { ofetch } from 'ofetch'
import { ProxyAgent } from 'undici'
const res1 = await ofetch('http://ip-api.com/json')
const res2 = await ofetch('http://ip-api.com/json', {
dispatcher: new ProxyAgent('http://127.0.0.1:7890'),
})
console.log('No Proxy IP: ' + res1.query)
console.log('Proxy IP: ' + res2.query) |
This is also a solution. Currently, I'm using |
I can confirm this is working perfectly fine. |
Using proxyagent from undici works fine for HTTP proxy. I didn't find a way for HTTPS proxies. |
Environment
demo package.json
Reproduction
The demo code
Describe the bug
console print
result is same, the set proxy is invalid
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: