Skip to content

Commit d01ad5a

Browse files
http3: set the h3 ALPN in the client’s tls.Config (#93)
1 parent 21ffadf commit d01ad5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

content/docs/http3/client.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ This package provides a `http.RoundTripper` implementation that can be used on t
88

99
```go
1010
tr := &http3.Transport{
11-
TLSClientConfig: &tls.Config{}, // set a TLS client config, if desired
11+
// set a TLS client config, if desired
12+
TLSClientConfig: &tls.Config{
13+
NextProtos: []string{http3.NextProtoH3}, // set the ALPN for HTTP/3
14+
},
1215
QUICConfig: &quic.Config{}, // QUIC connection options
1316
}
1417
defer tr.Close()

0 commit comments

Comments
 (0)