Changed POST API content-type to application/json

Fixed AddMember response parsing
added bot post message example
This commit is contained in:
densestvoid
2020-08-24 22:44:28 -04:00
parent d8cdcf4ef2
commit f900b99dac
4 changed files with 33 additions and 1 deletions

View File

@ -60,6 +60,10 @@ func (r response) UnmarshalJSON(bs []byte) error {
}
func (c Client) do(req *http.Request, i interface{}) error {
if req.Method == "POST" {
req.Header.Set("Content-Type", "application/json")
}
getResp, err := c.httpClient.Do(req)
if err != nil {
return err