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
This is my hystrix client:
client := hystrix.NewClient( hystrix.WithHTTPTimeout(1*time.Millisecond), hystrix.WithCommandName("request"), hystrix.WithHystrixTimeout(10*time.Millisecond), hystrix.WithMaxConcurrentRequests(600), hystrix.WithErrorPercentThreshold(20), )
I cant seem a way to parse in proxies so it sends requests from different IP addresses. This is how I would do it in net/http:
proxy := "http://" + selectProxy proxyURL, _ := url.Parse(proxy) transport := &http.Transport{Proxy: http.ProxyURL(proxyURL)}
client := &http.Client{Transport: transport, Timeout: 5 * time.Second}
Any help or tips to parse in the http transport/ dial or proxies with the hystrix client would be appreciated.
The text was updated successfully, but these errors were encountered:
Couldn't you use the Custom HTTP client functionality like so?
type myHTTPClient struct { client http.Client } func (c *myHTTPClient) Do(request *http.Request) (*http.Response, error) { return c.client.Do(request) } proxy := "http://" + selectProxy proxyURL, _ := url.Parse(proxy) transport := &http.Transport{Proxy: http.ProxyURL(proxyURL)} httpclient.NewClient(httpclient.WithHTTPClient(&myHTTPClient{client: &http.Client{Transport: transport, Timeout: 5 * time.Second}}))
Sorry, something went wrong.
No branches or pull requests
This is my hystrix client:
I cant seem a way to parse in proxies so it sends requests from different IP addresses.
This is how I would do it in net/http:
proxy := "http://" + selectProxy
proxyURL, _ := url.Parse(proxy)
transport := &http.Transport{Proxy: http.ProxyURL(proxyURL)}
client := &http.Client{Transport: transport, Timeout: 5 * time.Second}
Any help or tips to parse in the http transport/ dial or proxies with the hystrix client would be appreciated.
The text was updated successfully, but these errors were encountered: