Exemple #1
0
func main() {
	flag.Parse()
	goquic.SetLogLevel(logLevel)

	client := &http.Client{
		Transport: goquic.NewRoundTripper(false),
	}

	resp, err := client.Get(url)
	if err != nil {
		panic(err)
	}

	b, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(b))
}
Exemple #2
0
func MyClient(result *Result, connectTimeout, readTimeout, writeTimeout time.Duration) *http.Client {

	return &http.Client{
		Transport: goquic.NewRoundTripper(keepQuicConn),
	}
}