code: protected String executeRequest(HttpRequestBase request) throws IOException {
          HttpResponse response = client.execute(request);
          HttpEntity entity = response.getEntity();
          if (response.getStatusLine().getStatusCode() == 200) {
              return EntityUtils.toString(entity, "utf-8");
          } else {
              EntityUtils.consumeQuietly(entity);
              throw new IOException(response.getStatusLine().toString());
          }
      }
docs: Execute a request against the WSAPI
  
  @param request the request to be executed
  @return the JSON encoded string response
  @throws IOException if a non-200 response code is returned or if some other
  problem occurs while executing the request