Add Content-Type header to doAPI
This commit is contained in:
parent
84038cfd79
commit
a25056d2cc
|
@ -36,6 +36,9 @@ func (c *Client) doAPI(method string, uri string, params url.Values, res interfa
|
|||
return err
|
||||
}
|
||||
req.Header.Set("Authorization", "Bearer "+c.config.AccessToken)
|
||||
if params != nil {
|
||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
}
|
||||
resp, err = c.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue
Block a user