basic-lib/src/main/java/com/streamsets/pipeline/stage/origin/http/HttpClientSource.java
private boolean shouldMakeRequest() {
    final long now = System.currentTimeMillis();

    boolean shouldMakeRequest = lastRequestCompletedTime == -1;
    shouldMakeRequest |= lastRequestTimedOut;
    shouldMakeRequest |= next != null;
    shouldMakeRequest |= (haveMorePages && conf.pagination.mode != PaginationMode.LINK_HEADER);
    shouldMakeRequest |= now > lastRequestCompletedTime + conf.pollingInterval &&
        conf.httpMode == HttpClientMode.POLLING;
    shouldMakeRequest |= now > lastRequestCompletedTime && conf.httpMode == HttpClientMode.STREAMING && conf.httpMethod != HttpMethod.HEAD;

    return shouldMakeRequest;
  }
private boolean shouldMakeRequest() {
    final long now = System.currentTimeMillis();

    boolean shouldMakeRequest = lastRequestCompletedTime == -1;
    shouldMakeRequest |= lastRequestTimedOut;
    shouldMakeRequest |= next != null;
    shouldMakeRequest |= (haveMorePages && conf.pagination.mode != PaginationMode.LINK_HEADER);
    shouldMakeRequest |= now > lastRequestCompletedTime + conf.pollingInterval &&
        conf.httpMode == HttpClientMode.POLLING;
    shouldMakeRequest |= now > lastRequestCompletedTime && conf.httpMode == HttpClientMode.STREAMING && conf.httpMethod != HttpMethod.HEAD;

    return shouldMakeRequest;
  }
Determines whether or not we should continue making additional HTTP requests
in the current produce() call or whether to return the current batch.

@return true if we should make additional HTTP requests for this batch