Skip to content

Commit a0fe3d6

Browse files
yincongcyincongwyf9661
authored andcommitted
net/http: update NewRequestWithContext wrong link to NewRequest
Fixes golang#70874 Change-Id: Icbcfc95e6b45521880287dcc3bc8609461a3b401 GitHub-Last-Rev: 05276c5 GitHub-Pull-Request: golang#70877 Reviewed-on: https://go-review.googlesource.com/c/go/+/637035 Reviewed-by: qiu laidongfeng2 <[email protected]> Reviewed-by: Damien Neil <[email protected]> Reviewed-by: David Chase <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 5a2e008 commit a0fe3d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net/http/request.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,9 @@ func NewRequest(method, url string, body io.Reader) (*Request, error) {
873873
//
874874
// NewRequestWithContext returns a Request suitable for use with
875875
// [Client.Do] or [Transport.RoundTrip]. To create a request for use with
876-
// testing a Server Handler, either use the [NewRequest] function in the
877-
// net/http/httptest package, use [ReadRequest], or manually update the
878-
// Request fields. For an outgoing client request, the context
876+
// testing a Server Handler, either use the [net/http/httptest.NewRequest] function,
877+
// use [ReadRequest], or manually update the Request fields.
878+
// For an outgoing client request, the context
879879
// controls the entire lifetime of a request and its response:
880880
// obtaining a connection, sending the request, and reading the
881881
// response headers and body. See the Request type's documentation for

0 commit comments

Comments
 (0)