Sample usage:
static void setContent(HttpRequest request, Object item) { request.setContent(new UrlEncodedContent(item)); }
Implementation is not thread-safe.
545546547548549550551552553554555
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); request.setHeaders(headers);
954955956957958959960961962963964
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); if (readTimeout != -1) request.setReadTimeout(readTimeout);
880881882883884885886887888889890
642643644645646647648649650651652
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);
648649650651652653654655656657658
769770771772773774775776777778779
717718719720721722723724725726727
678679680681682683684685686687688
557558559560561562563564565566567
766767768769770771772773774775776