request_builder.go: fetcher: Force try HTTP/2
This commit is contained in:
parent
7990edd345
commit
d90667777f
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ func (r *RequestBuilder) IgnoreTLSErrors(value bool) *RequestBuilder {
|
||||||
func (r *RequestBuilder) ExecuteRequest(requestURL string) (*http.Response, error) {
|
func (r *RequestBuilder) ExecuteRequest(requestURL string) (*http.Response, error) {
|
||||||
transport := &http.Transport{
|
transport := &http.Transport{
|
||||||
Proxy: http.ProxyFromEnvironment,
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
// Setting `DialContext` disables HTTP/2, this option forces the transport to try HTTP/2 regardless.
|
||||||
|
ForceAttemptHTTP2: true,
|
||||||
DialContext: (&net.Dialer{
|
DialContext: (&net.Dialer{
|
||||||
// Default is 30s.
|
// Default is 30s.
|
||||||
Timeout: 10 * time.Second,
|
Timeout: 10 * time.Second,
|
||||||
|
|
Loading…
Reference in a new issue