diff options
Diffstat (limited to 'libgo/go/net/http/client.go')
-rw-r--r-- | libgo/go/net/http/client.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/go/net/http/client.go b/libgo/go/net/http/client.go index 5d45025..54564e0 100644 --- a/libgo/go/net/http/client.go +++ b/libgo/go/net/http/client.go @@ -278,6 +278,11 @@ func (c *Client) Post(url string, bodyType string, body io.Reader) (r *Response, return nil, err } req.Header.Set("Content-Type", bodyType) + if c.Jar != nil { + for _, cookie := range c.Jar.Cookies(req.URL) { + req.AddCookie(cookie) + } + } r, err = send(req, c.Transport) if err == nil && c.Jar != nil { c.Jar.SetCookies(req.URL, r.Cookies()) |