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) {
Map<String, Object> info = headerProvider.getHeaders();
for (String key : info.keySet()) {
headers.set(key, info.get(key));
}
}
request.setHeaders(headers);