static String makeRawPostRequest(HttpTransport httpTransport, String url, HttpContent httpContent)
      throws IOException {
    HttpRequestFactory factory = httpTransport.createRequestFactory();
    HttpRequest postRequest = factory.buildPostRequest(new GenericUrl(url), httpContent);
    HttpResponse response = postRequest.execute();
    int statusCode = response.getStatusCode();
    if (statusCode != 200) {
      throw new IOException(
          "Bad status code: " + statusCode + " error: " + response.getStatusMessage());
    }
    return CharStreams.toString(new InputStreamReader(response.getContent(), UTF_8));
  }
Util class for making OAuth requests and parsing the responses
libraries/auth/src/main/java/org/datatransferproject/auth/OAuthUtils.java