mirror of
https://github.com/golang/go
synced 2024-11-21 23:54:40 -07:00
net/http: the documentation should call NewRequest with the right signature.
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5554063
This commit is contained in:
parent
a99e35b625
commit
2a6b4e120a
@ -34,7 +34,8 @@ settings, create a Client:
|
||||
resp, err := client.Get("http://example.com")
|
||||
// ...
|
||||
|
||||
req := http.NewRequest("GET", "http://example.com", nil)
|
||||
req, err := http.NewRequest("GET", "http://example.com", nil)
|
||||
// ...
|
||||
req.Header.Add("If-None-Match", `W/"wyzzy"`)
|
||||
resp, err := client.Do(req)
|
||||
// ...
|
||||
|
Loading…
Reference in New Issue
Block a user