// generate the signature
params.computeSignature(requestMethod, url);
// make the request
HttpTransport transport = new NetHttpTransport();
HttpRequestFactory f = null;
if (useOAuth) {
f = transport.createRequestFactory(params);
} else {
f = transport.createRequestFactory();
}
HttpRequest request = null;
if ("POST".equals(requestMethod))
if (postData == null)
request = f.buildPostRequest(url, null);
else
request = f.buildPostRequest(url, new UrlEncodedContent(postData));
else
request = f.buildGetRequest(url);
HttpHeaders headers = new HttpHeaders();
headers.set("X-Factual-Lib", DRIVER_HEADER_TAG);
headers.set("Host", host);
if (headerProvider != null) {