Skip to content

Commit

Permalink
fix read() failure with private repos
Browse files Browse the repository at this point in the history
reorder buildRequest()
  • Loading branch information
Rob Schoening committed Sep 6, 2015
1 parent adaa8ec commit e0b109c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/kohsuke/github/Requester.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,12 @@ public InputStream asStream(String tailApiUrl) throws IOException {
while (true) {// loop while API rate limit is hit
setupConnection(root.getApiURL(tailApiUrl));

buildRequest();


// if the download link is encoded with a token on the query string, the default behavior of POST will fail
uc.setRequestMethod("GET");

buildRequest();

try {
return wrapStream(uc.getInputStream());
} catch (IOException e) {
Expand Down

0 comments on commit e0b109c

Please sign in to comment.