Explorar el Código

This is the way

Piotr Czajkowski hace 4 años
padre
commit
06b254980e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)
 	}