We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4187e1f commit 355d7faCopy full SHA for 355d7fa
src/net/http/transport.go
@@ -494,8 +494,9 @@ func (t *Transport) CloseIdleConnections() {
494
// CancelRequest cancels an in-flight request by closing its connection.
495
// CancelRequest should only be called after RoundTrip has returned.
496
//
497
-// Deprecated: Use Request.Cancel instead. CancelRequest cannot cancel
498
-// HTTP/2 requests.
+// Deprecated: Use Request.WithContext to create a request with a
+// cancelable context instead. CancelRequest cannot cancel HTTP/2
499
+// requests.
500
func (t *Transport) CancelRequest(req *Request) {
501
t.reqMu.Lock()
502
cancel := t.reqCanceler[req]
0 commit comments