Uses of Interface
kong.unirest.core.HttpResponse
-
Packages that use HttpResponse Package Description kong.unirest.core kong.unirest.core.java -
-
Uses of HttpResponse in kong.unirest.core
Classes in kong.unirest.core that implement HttpResponse Modifier and Type Class Description classBasicResponse<T>classByteResponseclassFailedResponse<T>A failed response you COULD return if you want to live in a house of lies.classFileResponseclassJsonResponseclassStringResponseMethods in kong.unirest.core that return HttpResponse Modifier and Type Method Description HttpResponse<byte[]>HttpRequest. asBytes()Executes the request and returns the response with the body mapped into a byte[]HttpResponse<Empty>HttpRequest. asEmpty()Executes the request and returns the response without parsing the bodyHttpResponse<File>HttpRequest. asFile(String path, CopyOption... copyOptions)Executes the request and writes the contents into a fileHttpResponse<JsonNode>HttpRequest. asJson()Executes the request and returns the response with the body mapped into a JsonNode<T> HttpResponse<T>HttpRequest. asObject(Class<? extends T> responseClass)Executes the request and returns the response with the body mapped into T by a configured ObjectMapper<T> HttpResponse<T>HttpRequest. asObject(Function<RawResponse,T> function)Execute the request and pass the raw response to a function for mapping.<T> HttpResponse<T>HttpRequest. asObject(GenericType<T> genericType)Executes the request and returns the response with the body mapped into T by a configured ObjectMapperHttpResponse<String>HttpRequest. asString()Executes the request and returns the response with the body mapped into a String<T> HttpResponseCache. get(Cache.Key key, Supplier<HttpResponse<T>> fetcher)Returns the cached HttpResponse for a key or uses the Supplier to fetch the response<E> HttpResponse<T>FailedResponse. ifFailure(Class<? extends E> errorClass, Consumer<HttpResponse<E>> consumer)HttpResponse<T>FailedResponse. ifFailure(Consumer<HttpResponse<T>> consumer)<E> HttpResponse<T>HttpResponse. ifFailure(Class<? extends E> errorClass, Consumer<HttpResponse<E>> consumer)If the response was NOT a 200-series response or a mapping exception happened.HttpResponse<T>HttpResponse. ifFailure(Consumer<HttpResponse<T>> consumer)If the response was NOT a 200-series response or a mapping exception happened.HttpResponse<T>FailedResponse. ifSuccess(Consumer<HttpResponse<T>> consumer)HttpResponse<T>HttpResponse. ifSuccess(Consumer<HttpResponse<T>> consumer)If the response was a 200-series response.<V> HttpResponse<V>FailedResponse. map(Function<T,V> func)<V> HttpResponse<V>HttpResponse. map(Function<T,V> func)Map the Response into another response with a different bodydefault HttpResponse<?>Interceptor. onFail(Exception e, HttpRequestSummary request, Config config)Called in the case of a total failure.<T> HttpResponse<T>Client. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, Class<?> resultType)Make a requestMethods in kong.unirest.core that return types with arguments of type HttpResponse Modifier and Type Method Description CompletableFuture<HttpResponse<byte[]>>HttpRequest. asBytesAsync()Executes the request asynchronously and returns the response with the body mapped into a byte[]CompletableFuture<HttpResponse<byte[]>>HttpRequest. asBytesAsync(Callback<byte[]> callback)Executes the request asynchronously and returns the response with the body mapped into a byte[]CompletableFuture<HttpResponse<Empty>>HttpRequest. asEmptyAsync()Executes the request asynchronously and returns the response without parsing the bodyCompletableFuture<HttpResponse<Empty>>HttpRequest. asEmptyAsync(Callback<Empty> callback)Executes the request asynchronously and returns a empty response which is passed to a callbackCompletableFuture<HttpResponse<File>>HttpRequest. asFileAsync(String path, CopyOption... copyOptions)asynchronously executes the request and writes the contents into a fileCompletableFuture<HttpResponse<File>>HttpRequest. asFileAsync(String path, Callback<File> callback, CopyOption... copyOptions)asynchronously executes the request and writes the contents into a fileCompletableFuture<HttpResponse<JsonNode>>HttpRequest. asJsonAsync()Executes the request asynchronously and returns the response with the body mapped into a JsonNodeCompletableFuture<HttpResponse<JsonNode>>HttpRequest. asJsonAsync(Callback<JsonNode> callback)Executes the request asynchronously and returns the response with the body mapped into a JsonNode<T> CompletableFuture<HttpResponse<T>>HttpRequest. asObjectAsync(Class<? extends T> responseClass)Executes the request asynchronously and returns response with the body mapped into T by a configured ObjectMapper<T> CompletableFuture<HttpResponse<T>>HttpRequest. asObjectAsync(Class<? extends T> responseClass, Callback<T> callback)Executes the request asynchronously, mapping to a type via the configured object mapper and then passed to a callback handler.<T> CompletableFuture<HttpResponse<T>>HttpRequest. asObjectAsync(Function<RawResponse,T> function)Executes the request asynchronously, and pass the raw response to a function for mapping.<T> CompletableFuture<HttpResponse<T>>HttpRequest. asObjectAsync(GenericType<T> genericType)Executes the request asynchronously, and use a GenericType with the ObjectMapper<T> CompletableFuture<HttpResponse<T>>HttpRequest. asObjectAsync(GenericType<T> genericType, Callback<T> callback)Executes the request asynchronously, and use a GenericType with the ObjectMapperCompletableFuture<HttpResponse<String>>HttpRequest. asStringAsync()Executes the request asynchronously and returns the response with the body mapped into a StringCompletableFuture<HttpResponse<String>>HttpRequest. asStringAsync(Callback<String> callback)Executes the request asynchronously and returns the response with the body mapped into a String<T> CompletableFuture<HttpResponse<T>>Client. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)Make a Async requestMethods in kong.unirest.core with parameters of type HttpResponse Modifier and Type Method Description voidCallback. completed(HttpResponse<T> response)default voidInterceptor. onResponse(HttpResponse<?> response, HttpRequestSummary request, Config config)Called just after the request.Method parameters in kong.unirest.core with type arguments of type HttpResponse Modifier and Type Method Description <T> PagedList<T>HttpRequest. asPaged(Function<HttpRequest,HttpResponse> mappingFunction, Function<HttpResponse<T>,String> linkExtractor)Allows for following paging links common in many APIs.<T> HttpResponseCache. get(Cache.Key key, Supplier<HttpResponse<T>> fetcher)Returns the cached HttpResponse for a key or uses the Supplier to fetch the response<T> CompletableFutureCache. getAsync(Cache.Key key, Supplier<CompletableFuture<HttpResponse<T>>> fetcher)Returns the cached HttpResponse for a key or uses the Supplier to fetch the response<E> HttpResponse<T>FailedResponse. ifFailure(Class<? extends E> errorClass, Consumer<HttpResponse<E>> consumer)HttpResponse<T>FailedResponse. ifFailure(Consumer<HttpResponse<T>> consumer)<E> HttpResponse<T>HttpResponse. ifFailure(Class<? extends E> errorClass, Consumer<HttpResponse<E>> consumer)If the response was NOT a 200-series response or a mapping exception happened.HttpResponse<T>HttpResponse. ifFailure(Consumer<HttpResponse<T>> consumer)If the response was NOT a 200-series response or a mapping exception happened.PagedList<T>PagedList. ifFailure(Consumer<HttpResponse<T>> consumer)For each failed response if the response was NOT a 200-series response or a mapping exception happened.HttpResponse<T>FailedResponse. ifSuccess(Consumer<HttpResponse<T>> consumer)HttpResponse<T>HttpResponse. ifSuccess(Consumer<HttpResponse<T>> consumer)If the response was a 200-series response.PagedList<T>PagedList. ifSuccess(Consumer<HttpResponse<T>> consumer)For each successful response If the response was a 200-series response.<T> HttpResponse<T>Client. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, Class<?> resultType)Make a request<T> CompletableFuture<HttpResponse<T>>Client. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)Make a Async request<T> CompletableFuture<HttpResponse<T>>Client. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)Make a Async request -
Uses of HttpResponse in kong.unirest.core.java
Methods in kong.unirest.core.java that return HttpResponse Modifier and Type Method Description <T> HttpResponse<T>JavaClient. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, Class<?> resultType)protected <T> HttpResponse<T>JavaClient. transformBody(Function<RawResponse,HttpResponse<T>> transformer, RawResponse rr)Methods in kong.unirest.core.java that return types with arguments of type HttpResponse Modifier and Type Method Description <T> CompletableFuture<HttpResponse<T>>JavaClient. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)Method parameters in kong.unirest.core.java with type arguments of type HttpResponse Modifier and Type Method Description <T> HttpResponse<T>JavaClient. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, Class<?> resultType)<T> CompletableFuture<HttpResponse<T>>JavaClient. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)<T> CompletableFuture<HttpResponse<T>>JavaClient. request(HttpRequest request, Function<RawResponse,HttpResponse<T>> transformer, CompletableFuture<HttpResponse<T>> callback, Class<?> resultType)protected <T> HttpResponse<T>JavaClient. transformBody(Function<RawResponse,HttpResponse<T>> transformer, RawResponse rr)
-