From d6bff26e621e0476095f7713cdbdca7cfcd42133 Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Wed, 19 Apr 2017 14:43:37 +0900 Subject: [PATCH] Fix to use http status const --- streaming.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streaming.go b/streaming.go index 005920c..b5e4397 100644 --- a/streaming.go +++ b/streaming.go @@ -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) } }