]> Cypherpunks repositories - gostls13.git/commit
net/http: mention NewRequestWithContext+Client.Do for custom contexts
authorEmmanuel T Odeke <emmanuel@orijtech.com>
Sun, 7 Mar 2021 23:30:47 +0000 (15:30 -0800)
committerDamien Neil <dneil@google.com>
Fri, 19 Mar 2021 16:11:47 +0000 (16:11 +0000)
commita937729c2c2f6950a32bc5cd0f5b88700882f078
tree6a51660b973f3e557e034949d902aac7c1210c9a
parent196b104bc172c8ba7e0565293722de319071ade3
net/http: mention NewRequestWithContext+Client.Do for custom contexts

Adds mentions of NewRequestWithContext and *Client.Do as prescriptions
for how to use a specified context.Context, to the docs of:
* (*Client).Get
* (*Client).Head
* (*Client).Post
* (*Client).PostForm
* Get
* Head
* Post
* PostForm

given that we can't remove those convenience functions, nor
change the method signatures, except for Go2.

Fixes #35562

Change-Id: I4859e6757e7f958c9067ac4ef15881cfba7d1f8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/299610
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/http/client.go