1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:44: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:
Christoph Hack 2012-01-19 06:11:02 -08:00 committed by Brad Fitzpatrick
parent a99e35b625
commit 2a6b4e120a

View File

@ -34,7 +34,8 @@ settings, create a Client:
resp, err := client.Get("http://example.com") 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"`) req.Header.Add("If-None-Match", `W/"wyzzy"`)
resp, err := client.Do(req) resp, err := client.Do(req)
// ... // ...