github.com/0chain/gosdk@v1.17.11/core/util/transport_wasm.go (about)

     1  //go:build js && wasm
     2  // +build js,wasm
     3  
     4  package util
     5  
     6  import (
     7  	"net/http"
     8  	"time"
     9  )
    10  
    11  // Run the HTTP request in a goroutine and pass the response to f.
    12  var transport = &http.Transport{
    13  	Proxy:                 http.ProxyFromEnvironment,
    14  	MaxIdleConns:          1000,
    15  	IdleConnTimeout:       90 * time.Second,
    16  	TLSHandshakeTimeout:   10 * time.Second,
    17  	ExpectContinueTimeout: 1 * time.Second,
    18  	MaxIdleConnsPerHost:   5,
    19  	ForceAttemptHTTP2:     true,
    20  }