client.go POST requests fixed.

This commit is contained in:
Alexey Skobkin 2016-03-18 00:40:13 +03:00
parent 602552baf9
commit 6e2664d6d3

View file

@ -80,6 +80,9 @@ func (c *Client) MakePostRequest(url string, params url.Values) ([]byte, error)
req.Header.Set("Authorization", c.token.AuthToken) req.Header.Set("Authorization", c.token.AuthToken)
} }
// Adding necessary for POST request header
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
resp, resp_err := hc.Do(req) resp, resp_err := hc.Do(req)
if resp_err != nil { if resp_err != nil {