public interface RxHttpClient
Maybe instances.| Modifier and Type | Method and Description |
|---|---|
static RxHttpClient |
create(AsyncHttpClient asyncHttpClient)
Returns a new
RxHttpClient instance that uses the given asyncHttpClient under the hoods. |
default io.reactivex.Maybe<Response> |
prepare(Request request)
Prepares the given
request. |
<T> io.reactivex.Maybe<T> |
prepare(Request request,
java.util.function.Supplier<? extends AsyncHandler<T>> handlerSupplier)
Prepares the given
request. |
static RxHttpClient create(AsyncHttpClient asyncHttpClient)
RxHttpClient instance that uses the given asyncHttpClient under the hoods.asyncHttpClient - the Async HTTP Client instance to be usedRxHttpClient instanceNullPointerException - if asyncHttpClient is nulldefault io.reactivex.Maybe<Response> prepare(Request request)
request. For each subscription to the returned Maybe, a new HTTP request will
be executed and its response will be emitted.request - the request that is to be executedMaybe that executes request upon subscription and emits the responseNullPointerException - if request is null<T> io.reactivex.Maybe<T> prepare(Request request, java.util.function.Supplier<? extends AsyncHandler<T>> handlerSupplier)
request. For each subscription to the returned Maybe, a new HTTP request will
be executed and the results of AsyncHandlers obtained from handlerSupplier will be emitted.T - the result type produced by handlers produced by handlerSupplier and emitted by the returned
Maybe instancerequest - the request that is to be executedhandlerSupplier - supplies the desired AsyncHandler instances that are used to produce resultsMaybe that executes request upon subscription and that emits the results produced by
the supplied handersNullPointerException - if at least one of the parameters is nullCopyright © 2017. All Rights Reserved.