1
0
mirror of https://github.com/golang/go synced 2024-11-26 14:08:37 -07:00

doc/go1.16: mention net/http.Transport.GetProxyConnectHeader

For #40700
For #41048

Change-Id: Ida6bcaaf5edaa2bba9ba2b8e02ec9959481f8302
Reviewed-on: https://go-review.googlesource.com/c/go/+/285594
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2021-01-21 18:10:47 -08:00
parent ec1b945265
commit cf10e69f17

View File

@ -807,6 +807,19 @@ func TestFoo(t *testing.T) {
<code>HTTPS_PROXY</code> is unset.
</p>
<p><!-- 259917 -->
The <a href="/pkg/net/http/#Transport"><code>Transport</code></a>
type has a new field
<a href="/pkg/net/http/#Transport.GetProxyConnectHeader"><code>GetProxyConnectHeader</code></a>
which may be set to a function that returns headers to send to a
proxy during a <code>CONNECT</code> request.
In effect <code>GetProxyConnectHeader</code> is a dynamic
version of the existing field
<a href="/pkg/net/http/#Transport.ProxyConnectHeader"><code>ProxyConnectHeader</code></a>;
if <code>GetProxyConnectHeader</code> is not <code>nil</code>,
then <code>ProxyConnectHeader</code> is ignored.
</p>
<p><!-- CL 243939 -->
The new <a href="/pkg/net/http/#FS"><code>http.FS</code></a>
function converts an <a href="/pkg/io/fs/#FS"><code>fs.FS</code></a>