Sample usage:
static void setContent(HttpRequest request, Object item) { request.setContent(new UrlEncodedContent(item)); }
Implementation is not thread-safe.
892893894895896897898899900901902
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);
557558559560561562563564565566567
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);
820821822823824825826827828829830
447448449450451452453454455456457
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);
572573574575576577578579580581582
805806807808809810811812813814815
874875876877878879880881882883884
819820821822823824825826827828829