mirror of
https://github.com/golang/go
synced 2024-11-23 02:10:03 -07:00
doc: document net/http.Request.Cancel in go1.5.html
Change-Id: If1c12b43ef467c3ef2cbbaaba1bda4ea98032c7e Reviewed-on: https://go-review.googlesource.com/12430 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
1b5eaa4382
commit
e28ff1f3a1
@ -1097,6 +1097,17 @@ For details, see the documentation for
|
||||
<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
There is a new method to cancel a <a href="/pkg/net/http/"><code>net/http</code></a>
|
||||
<code>Request</code> by setting the new
|
||||
<a href="/pkg/net/http/#Request"><code>Request.Cancel</code></a>
|
||||
field.
|
||||
It is supported by <code>http.Transport</code>.
|
||||
The <code>Cancel</code> field's type is compatible with the
|
||||
<a href="https://godoc.org/golang.org/x/net/context"><code>context.Context.Done</code></a>
|
||||
return value.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Also in the <a href="/pkg/net/http/"><code>net/http</code></a> package,
|
||||
there is code to ignore the zero <a href="/pkg/time/#Time"><code>Time</code></a> value
|
||||
|
Loading…
Reference in New Issue
Block a user