public final class RestCallUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static io.reactivex.Completable |
callEndpoint(org.everit.http.client.HttpClient httpClient,
RestRequest restRequest,
Optional<RestRequestEnhancer> requestEnhancer)
Calls a rest endpoint asynchronously where there is no response body.
|
static <T> io.reactivex.Single<T> |
callEndpoint(org.everit.http.client.HttpClient httpClient,
RestRequest restRequest,
Optional<RestRequestEnhancer> requestEnhancer,
com.fasterxml.jackson.core.type.TypeReference<T> returnType)
Calls a rest endpoint asynchronously.
|
static Collection<String> |
objectCollectionToStringCollection(Collection<?> collection)
Converts any kind of collection to a string collection.
|
public static io.reactivex.Completable callEndpoint(org.everit.http.client.HttpClient httpClient,
RestRequest restRequest,
Optional<RestRequestEnhancer> requestEnhancer)
httpClient - The HttpClient implementation.restRequest - The request that is used to call the endpoint.requestEnhancer - If specified, it is used to enhance the rest request before sending it.public static <T> io.reactivex.Single<T> callEndpoint(org.everit.http.client.HttpClient httpClient,
RestRequest restRequest,
Optional<RestRequestEnhancer> requestEnhancer,
com.fasterxml.jackson.core.type.TypeReference<T> returnType)
T - Type of the response body.httpClient - The HttpClient implementation.restRequest - The request that is used to call the endpoint.requestEnhancer - If specified, it is used to enhance the rest request before sending it.returnType - Type of the response body, Jackson is used to convert it from JSON to a typed java
object.public static Collection<String> objectCollectionToStringCollection(Collection<?> collection)
collection - The any kind of object collection.Copyright © 2011–2019 Everit Kft.. All rights reserved.