public RESPONSE get(WebResource resource) throws IOException {
    LOG.info("GET {}", resource);

    InputStream inputStream = readFrom(resource, "GET", null, new HashMap<String, String>());

    recordLastCurlCommand(String.format("curl \"" + resource.toString() + "\""));
    String responseJson = IOUtils.toString(inputStream);
    LOG.debug("RESPONSE {}", responseJson);
    return gson.fromJson(responseJson, responseClass);
  }
Main implementation of GET request
@param resource resource
@return unmarshalled response data
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/templeton/client/JSONRequest.java