T create a Transport.
()
| 153 | |
| 154 | // T create a Transport. |
| 155 | func T() *Transport { |
| 156 | t := &Transport{ |
| 157 | Options: transport.Options{ |
| 158 | Proxy: http.ProxyFromEnvironment, |
| 159 | MaxIdleConns: 100, |
| 160 | IdleConnTimeout: 90 * time.Second, |
| 161 | TLSHandshakeTimeout: 10 * time.Second, |
| 162 | ExpectContinueTimeout: 1 * time.Second, |
| 163 | TLSClientConfig: &tls.Config{NextProtos: []string{"http/1.1", "h2"}}, |
| 164 | }, |
| 165 | } |
| 166 | t.t2 = &h2internal.Transport{Options: &t.Options} |
| 167 | return t |
| 168 | } |
| 169 | |
| 170 | // HttpRoundTripFunc is a http.RoundTripper implementation, which is a simple function. |
| 171 | type HttpRoundTripFunc func(req *http.Request) (resp *http.Response, err error) |
no outgoing calls
no test coverage detected