-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
【question】How can I reuse the client and use proxy? #1904
Comments
不应修改? |
When a |
Perhaps a method could be added to |
Thank you very much for your answer.
|
Sorry, I don't speak English. So the English is all machine translated.
1. 源代码 || Source Code
我尝试复用
*fasthttp.Client
,而且使用代理。**I tried to reuse
*fasthttp.Client
and use a proxy. **预想的情况是代理URL是错误的,所以进行请求肯定会出现错误。
The expected situation is that the proxy URL is wrong, so the request will definitely fail.
2. 结果 || Result
确实如此,代理URL是错误的。可是第二次请求设置了
2222
代理。然而,从错误输出来看,第二次请求并没有使用。Indeed, the proxy URL is wrong. But the second request sets the
2222
proxy. However, from the error output, the second request does not use it.我尝试了另一种方式,第一次请求不设置代理,也就是
fasthttp.Client
初始化时。但是,第二次请求仍然不会使用2222
代理。I tried another way, not setting the proxy for the first request, which is when
fasthttp.Client
is initialized. However, the second request still does not use the2222
proxy.3. 疑问 || Question
难道无法重新设置Dial的值吗,只有在初始化时才可以设置。
Is it not possible to reset the value of Dial? It can only be set during initialization.
我该如何重用
*fasthttp.Client
,并重新设置代理?How can I reuse
*fasthttp.Client
and re-set the proxy?The text was updated successfully, but these errors were encountered: