private byte[] httpGet(String requestUrl) throws IOException {
    GetMethod getMethod = new GetMethod(requestUrl);
    try {
      int responseCode = httpClient.executeMethod(getMethod);
      LOG.debug("Received response code: {} for the get request on the url: {}", responseCode, requestUrl);
      byte[] response = getMethod.getResponseBody();
      if (responseCode != HttpStatus.SC_OK) {
        throw new SamzaException(String.format("Received response code: %s for get request on: %s, with message: %s.",
                                               responseCode, requestUrl, StringUtils.newStringUtf8(response)));
      }
      return response;
    } finally {
      getMethod.releaseConnection();
    }
  }
This method initiates http get request on the request url and returns the
response returned from the http get.
@param requestUrl url on which the http get request has to be performed.
@return the http get response.
@throws IOException if there are problems with the http get request.
samza-rest/src/main/java/org/apache/samza/monitor/JobsClient.java