mirror of
https://github.com/golang/go
synced 2024-11-22 01:04:40 -07:00
parent
7870672c7f
commit
e465ad3cbd
@ -137,11 +137,13 @@ func Get(url string) (r *Response, finalURL string, err os.Error) {
|
||||
func Post(url string, bodyType string, body io.Reader) (r *Response, err os.Error) {
|
||||
var req Request
|
||||
req.Method = "POST"
|
||||
req.ProtoMajor = 1
|
||||
req.ProtoMinor = 1
|
||||
req.Body = nopCloser{body}
|
||||
req.Header = map[string]string{
|
||||
"Content-Type": bodyType,
|
||||
"Transfer-Encoding": "chunked",
|
||||
}
|
||||
req.TransferEncoding = []string{"chunked"}
|
||||
|
||||
req.URL, err = ParseURL(url)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user