Browse Source

This is the way

Piotr Czajkowski 4 years ago
parent
commit
06b254980e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rest.go

+ 1 - 1
rest.go

@@ -23,7 +23,7 @@ func GET(url string) (io.ReadCloser, error) {
 		return nil, fmt.Errorf("Response error: %v", err)
 	}
 
-	if resp.StatusCode != 200 {
+	if resp.StatusCode != http.StatusOK {
 		return resp.Body, fmt.Errorf("Request unsuccessful: %v - %v", resp.Status, url)
 	}