| Modifier and Type | Class and Description |
|---|---|
class |
BinaryResponse |
class |
FileResponse |
class |
JsonResponse |
class |
StringResponse |
| Modifier and Type | Method and Description |
|---|---|
HttpResponse<InputStream> |
HttpRequest.asBinary()
Deprecated.
This method returns a copy of the original stream and is not suitable for streaming. Use asObject(Function<RawResponse, T> function)
|
HttpResponse |
HttpRequest.asEmpty()
Executes the request and returns the response without parsing the body
|
HttpResponse<File> |
HttpRequest.asFile(String path)
Executes the request and writes the contents into a file
|
HttpResponse<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(java.util.function.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 ObjectMapper
|
HttpResponse<String> |
HttpRequest.asString()
Executes the request and returns the response with the body mapped into a String
|
HttpResponse<T> |
HttpResponse.ifFailure(java.util.function.Consumer<HttpResponse<T>> consumer)
If the response was NOT a 200-series response or a mapping exception happened.
|
HttpResponse<T> |
HttpResponse.ifSuccess(java.util.function.Consumer<HttpResponse<T>> consumer)
If the response was a 200-series response.
|
<T> HttpResponse<T> |
Client.request(HttpRequest request,
java.util.function.Function<RawResponse,HttpResponse<T>> transformer)
Make a request
|
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<HttpResponse<InputStream>> |
HttpRequest.asBinaryAsync()
Deprecated.
This method returns a copy of the original stream and is not suitable for streaming. Use asObjectAsync(Function<RawResponse, T> function)
|
CompletableFuture<HttpResponse<InputStream>> |
HttpRequest.asBinaryAsync(Callback<InputStream> callback)
Deprecated.
This method returns a copy of the original stream and is not suitable for streaming. Use asObjectAsync(Function<RawResponse, T> function)
|
CompletableFuture<HttpResponse<Empty>> |
HttpRequest.asEmptyAsync()
Executes the request asynchronously and returns the response without parsing the body
|
CompletableFuture<HttpResponse<Empty>> |
HttpRequest.asEmptyAsync(Callback<Empty> callback)
Executes the request asynchronously and returns a empty response which is passed to a callback
|
CompletableFuture<HttpResponse<File>> |
HttpRequest.asFileAsync(String path)
asynchronously executes the request and writes the contents into a file
|
CompletableFuture<HttpResponse<File>> |
HttpRequest.asFileAsync(String path,
Callback<File> callback)
asynchronously executes the request and writes the contents into a file
|
CompletableFuture<HttpResponse<JsonNode>> |
HttpRequest.asJsonAsync()
Executes the request asynchronously and returns the response with the body mapped into a JsonNode
|
CompletableFuture<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(java.util.function.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 ObjectMapper
|
CompletableFuture<HttpResponse<String>> |
HttpRequest.asStringAsync()
Executes the request asynchronously and returns the response with the body mapped into a String
|
CompletableFuture<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>> |
AsyncClient.request(HttpRequest request,
java.util.function.Function<RawResponse,HttpResponse<T>> transformer,
CompletableFuture<HttpResponse<T>> callback)
Make a Async request
|
| Modifier and Type | Method and Description |
|---|---|
void |
Callback.completed(HttpResponse<T> response) |
| Modifier and Type | Method and Description |
|---|---|
<T> PagedList<T> |
HttpRequest.asPaged(java.util.function.Function<HttpRequest,HttpResponse> mappingFunction,
java.util.function.Function<HttpResponse<T>,String> linkExtractor)
Allows for following paging links common in many APIs.
|
<T> PagedList<T> |
HttpRequest.asPaged(java.util.function.Function<HttpRequest,HttpResponse> mappingFunction,
java.util.function.Function<HttpResponse<T>,String> linkExtractor)
Allows for following paging links common in many APIs.
|
PagedList<T> |
PagedList.ifFailure(java.util.function.Consumer<HttpResponse<T>> consumer)
For each failed response if the response was NOT a 200-series response or a mapping exception happened.
|
HttpResponse<T> |
HttpResponse.ifFailure(java.util.function.Consumer<HttpResponse<T>> consumer)
If the response was NOT a 200-series response or a mapping exception happened.
|
PagedList<T> |
PagedList.ifSuccess(java.util.function.Consumer<HttpResponse<T>> consumer)
For each successful response If the response was a 200-series response.
|
HttpResponse<T> |
HttpResponse.ifSuccess(java.util.function.Consumer<HttpResponse<T>> consumer)
If the response was a 200-series response.
|
<T> HttpResponse<T> |
Client.request(HttpRequest request,
java.util.function.Function<RawResponse,HttpResponse<T>> transformer)
Make a request
|
<T> CompletableFuture<HttpResponse<T>> |
AsyncClient.request(HttpRequest request,
java.util.function.Function<RawResponse,HttpResponse<T>> transformer,
CompletableFuture<HttpResponse<T>> callback)
Make a Async request
|
<T> CompletableFuture<HttpResponse<T>> |
AsyncClient.request(HttpRequest request,
java.util.function.Function<RawResponse,HttpResponse<T>> transformer,
CompletableFuture<HttpResponse<T>> callback)
Make a Async request
|
Copyright © 2019. All rights reserved.