Fix to use http status const

This commit is contained in:
178inaba 2017-04-19 14:43:37 +09:00
parent aa0f9563ac
commit d6bff26e62

View File

@ -93,7 +93,7 @@ func (c *Client) streaming(ctx context.Context, p string, tag string) (chan Even
if err == nil {
req.Header.Set("Authorization", "Bearer "+c.config.AccessToken)
resp, err = c.Do(req)
if resp != nil && resp.StatusCode != 200 {
if resp != nil && resp.StatusCode != http.StatusOK {
err = parseAPIError("bad request", resp)
}
}