Re: [go-nuts] possible to set tls.Config.Servername with http.client.Do

2019-07-16 Thread efahale
Hi Andy, thank you for your suggestion. However in my case I am not using the server name in the HTTP request but IP address and the reason for this is that I am scraping metrics using Prometheus from each instance which respond to the server name. Also the certificate

Re: [go-nuts] possible to set tls.Config.Servername with http.client.Do

2019-07-15 Thread Andy Balholm
If you leave the Servername blank, http.Transport will get it from the HTTP request. Andy > On Jul 15, 2019, at 12:27 PM, efah...@gmail.com wrote: > > Hi, > > I was wondering how one can do concurrent tls requests with one single > http.Client where all the servers serving the request have t

[go-nuts] possible to set tls.Config.Servername with http.client.Do

2019-07-15 Thread efahale
Hi, I was wondering how one can do concurrent tls requests with one single http.Client where all the servers serving the request have their certificates from the same root CA but require different tls.Config.Servername. Would be nice to have a function like http.client.DoWithServername(req, s