Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
1726e81c
Commit
1726e81c
authored
Oct 23, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
publish Request.Write (rename from Request.write)
R=rsc CC=go-dev
http://go/go-review/1015003
parent
b74fd8ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/pkg/http/client.go
src/pkg/http/client.go
+1
-1
src/pkg/http/request.go
src/pkg/http/request.go
+2
-2
No files found.
src/pkg/http/client.go
View file @
1726e81c
...
...
@@ -125,7 +125,7 @@ func send(req *Request) (resp *Response, err os.Error) {
return
nil
,
err
;
}
err
=
req
.
w
rite
(
conn
);
err
=
req
.
W
rite
(
conn
);
if
err
!=
nil
{
conn
.
Close
();
return
nil
,
err
;
...
...
src/pkg/http/request.go
View file @
1726e81c
...
...
@@ -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
)
w
rite
(
w
io
.
Writer
)
os
.
Error
{
func
(
req
*
Request
)
W
rite
(
w
io
.
Writer
)
os
.
Error
{
uri
:=
URLEscape
(
req
.
Url
.
Path
);
if
req
.
Url
.
RawQuery
!=
""
{
uri
+=
"?"
+
req
.
Url
.
RawQuery
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment