private Response doRequest(HttpGet req, boolean storeRespCookie) throws IOException {
    addCookieHeader(req);

    CloseableHttpResponse resp = httpclient.execute(req, context);

    boolean isNew = true;
    String reqCookie = getCookieHeader(resp);
    if (reqCookie == null) {
      isNew = false;
      reqCookie = cookie;
    } else if (storeRespCookie) {
      cookie = reqCookie;
    }

    StatusLine status = resp.getStatusLine();
    if (status.getStatusCode() != 200) {
      throw new IOException("Http request to " + req.getURI().getHost() + "["
          + req.getURI().getPort() + "] failed. " + status);
    }

    Response response = new Response(reqCookie, EntityUtils.toString(resp.getEntity()), isNew);
    resp.close();
    return response;
  }
Sends a request to the server and returns a custom response object with the result

@param storeRespCookie if true, retain the value of a "Set-Cookie" header returned in the
       response.
geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/Client.java