/** * 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); } } }
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); } } }
setupConnection(root.getApiURL(tailApiUrl)); buildRequest();
setupConnection(root.getApiURL(tailApiUrl)); buildRequest();
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); } } }
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); } } }