Skip to content

Commit

Permalink
net/http: document Request.Body more
Browse files Browse the repository at this point in the history
Fixes #6221

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13289043
  • Loading branch information
bradfitz committed Aug 27, 2013
1 parent c7c1a1b commit 2ede818
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pkg/net/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,16 @@ type Request struct {
// following a hyphen uppercase and the rest lowercase.
Header Header

// The message body.
// Body is the request's body.
//
// For client requests, a nil body means the request has no
// body, such as a GET request. The HTTP Client's Transport
// is responsible for calling the Close method.
//
// For server requests, the Request Body is always non-nil
// but will return EOF immediately when no body is present.
// The Server will close the request body. The ServeHTTP
// Handler does not need to.
Body io.ReadCloser

// ContentLength records the length of the associated content.
Expand Down

0 comments on commit 2ede818

Please sign in to comment.