1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:04:41 -07:00

publish Request.Write (rename from Request.write)

R=rsc
CC=go-dev
http://go/go-review/1015003
This commit is contained in:
Rob Pike 2009-10-23 14:19:47 -07:00
parent b74fd8ecb1
commit 1726e81c00
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ func send(req *Request) (resp *Response, err os.Error) {
return nil, err;
}
err = req.write(conn);
err = req.Write(conn);
if err != nil {
conn.Close();
return nil, err;

View File

@ -125,7 +125,7 @@ func valueOrDefault(value, def string) string {
// TODO(rsc): Change default UserAgent before open-source release.
const defaultUserAgent = "http.Client"
// Write an HTTP/1.1 request -- header and body -- in wire format.
// Write writes an HTTP/1.1 request -- header and body -- in wire format.
// This method consults the following fields of req:
// Url
// Method (defaults to "GET")
@ -135,7 +135,7 @@ const defaultUserAgent = "http.Client"
// Body
//
// If Body is present, "Transfer-Encoding: chunked" is forced as a header.
func (req *Request) write(w io.Writer) os.Error {
func (req *Request) Write(w io.Writer) os.Error {
uri := URLEscape(req.Url.Path);
if req.Url.RawQuery != "" {
uri += "?" + req.Url.RawQuery;