public RequestBodyEntity body(JsonNode body) { this.body = body.toString(); return this; }
public HttpPatchWithBody(final URI uri) { super(); setURI(uri); }
public HttpDeleteWithBody(final URI uri) { super(); setURI(uri); }
protected HttpRequest get(String path) { log.info("[GET] {}", (origin + path)); return Unirest.get(origin + path); }
protected HttpRequestWithBody post(String path) { log.info("[POST] {}", (origin + path)); return Unirest.post(origin + path); }
protected HttpRequest delete(String path) { log.info("[DELETE] {}", (origin + path)); return Unirest.delete(origin + path); }
protected HttpRequest put(String path) { log.info("[PUT] {}", (origin + path)); return Unirest.put(origin + path); }
public HttpResponse<String> asString() throws UnirestException { return HttpClientHelper.request(httpRequest, String.class); }
public Future<HttpResponse<JsonNode>> asJsonAsync() { return HttpClientHelper.requestAsync(httpRequest, JsonNode.class, null); }
public HttpResponse<JsonNode> asJson() throws UnirestException { return HttpClientHelper.request(httpRequest, JsonNode.class); }
public <T> Future<HttpResponse<T>> asObjectAsync(Class<? extends T> responseClass) { return HttpClientHelper.requestAsync(httpRequest, (Class) responseClass, null); }
public HttpResponse<InputStream> asBinary() throws UnirestException { return HttpClientHelper.request(httpRequest, InputStream.class); }
public Future<HttpResponse<InputStream>> asBinaryAsync() { return HttpClientHelper.requestAsync(httpRequest, InputStream.class, null); }
public <T> HttpResponse<T> asObject(Class<? extends T> responseClass) throws UnirestException { return HttpClientHelper.request(httpRequest, (Class) responseClass); }
public Future<HttpResponse<String>> asStringAsync() { return HttpClientHelper.requestAsync(httpRequest, String.class, null); }