diff --git a/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java b/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java index 7f18ca4..6cc1567 100644 --- a/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java +++ b/src/main/java/io/gitlab/jfronny/commons/HttpUtils.java @@ -139,7 +139,7 @@ public class HttpUtils { } catch (InterruptedException e) { throw new IOException("Could not send request", e); } - if (res.statusCode() == 200) return res.body(); + if (res.statusCode() / 100 == 2) return res.body(); Optional location = res.headers().firstValue("location"); // Redirect if (location.isPresent() && (res.statusCode() == 302 || res.statusCode() == 307) && method == Method.GET) {