private void fetch() { if (next!=null) return; // already fetched if (url==null) return; // no more data to fetch try { while (true) {// loop while API rate limit is hit setupConnection(url); try { next = parse(type,null); assert next!=null; findNextURL(); return; } catch (IOException e) { handleApiError(e); } } } catch (IOException e) { throw new Error(e); } }
/** * Makes a request and just obtains the HTTP status code. */ public int asHttpStatusCode(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit setupConnection(root.getApiURL(tailApiUrl)); buildRequest(); try { return uc.getResponseCode(); } catch (IOException e) { handleApiError(e); } } }
private void fetch() { if (next!=null) return; // already fetched if (url==null) return; // no more data to fetch try { while (true) {// loop while API rate limit is hit setupConnection(url); try { next = parse(type,null); assert next!=null; findNextURL(); return; } catch (IOException e) { handleApiError(e); } finally { noteRateLimit(tailApiUrl); } } } catch (IOException e) { throw new GHException("Failed to retrieve "+url); } }
public InputStream asStream(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit setupConnection(root.getApiURL(tailApiUrl)); buildRequest(); try { return wrapStream(uc.getInputStream()); } catch (IOException e) { handleApiError(e); } } }
private void fetch() { if (next!=null) return; // already fetched if (url==null) return; // no more data to fetch try { while (true) {// loop while API rate limit is hit setupConnection(url); try { next = parse(type,null); assert next!=null; findNextURL(); return; } catch (IOException e) { handleApiError(e); } finally { noteRateLimit(tailApiUrl); } } } catch (IOException e) { throw new GHException("Failed to retrieve "+url); } }
handleApiError(e); } finally { noteRateLimit(tailApiUrl);
public InputStream asStream(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit setupConnection(root.getApiURL(tailApiUrl)); buildRequest(); try { return wrapStream(uc.getInputStream()); } catch (IOException e) { handleApiError(e); } finally { noteRateLimit(tailApiUrl); } } }
handleApiError(e); } finally { noteRateLimit(tailApiUrl);
public InputStream asStream(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit setupConnection(root.getApiURL(tailApiUrl)); buildRequest(); try { return wrapStream(uc.getInputStream()); } catch (IOException e) { handleApiError(e); } finally { noteRateLimit(tailApiUrl); } } }
/** * Makes a request and just obtains the HTTP status code. */ public int asHttpStatusCode(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit method("GET"); setupConnection(root.getApiURL(tailApiUrl)); buildRequest(); try { return uc.getResponseCode(); } catch (IOException e) { handleApiError(e); } finally { noteRateLimit(tailApiUrl); } } }
/** * Makes a request and just obtains the HTTP status code. */ public int asHttpStatusCode(String tailApiUrl) throws IOException { while (true) {// loop while API rate limit is hit method("GET"); setupConnection(root.getApiURL(tailApiUrl)); buildRequest(); try { return uc.getResponseCode(); } catch (IOException e) { handleApiError(e); } finally { noteRateLimit(tailApiUrl); } } }