We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 do I use a different proxy for each request
The text was updated successfully, but these errors were encountered:
I think it's not possible with goroutines. So I just created a channel of req.Client and use it in the code like this
cl := <-clients defer func() {clients <- cl}() cl.SetProxyUrl(...) *other code*
Sorry, something went wrong.
Proxy is a client-level only setting, but you can use some hook (e.g. OnBeforeRequest) to change proxy for each request.
The exampoe here may inspire you: https://req.cool/docs/examples/easily-write-crawlers-with-req/#automatically-change-ip-when-request-fails-set-proxy
No branches or pull requests
How do I use a different proxy for each request
The text was updated successfully, but these errors were encountered: