From 75a40815498fa370e81ad3bc60fb769eb8c7ce1f Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 1 Dec 2015 14:57:30 +0100 Subject: [PATCH] Follow up to PR #216 --- src/main/java/org/kohsuke/github/Requester.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/kohsuke/github/Requester.java b/src/main/java/org/kohsuke/github/Requester.java index 92f069bdfe..81fe507d8b 100644 --- a/src/main/java/org/kohsuke/github/Requester.java +++ b/src/main/java/org/kohsuke/github/Requester.java @@ -259,6 +259,8 @@ public int asHttpStatusCode(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit setupConnection(root.getApiURL(tailApiUrl)); + uc.setRequestMethod("GET"); + buildRequest(); try { @@ -273,7 +275,6 @@ public InputStream asStream(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit setupConnection(root.getApiURL(tailApiUrl)); - // if the download link is encoded with a token on the query string, the default behavior of POST will fail uc.setRequestMethod("GET");