Fix to use http status const

pull/27/head
178inaba 2017-04-19 14:43:37 +09:00
parent aa0f9563ac
commit d6bff26e62
1 changed files with 1 additions and 1 deletions

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)
}
}