public interface RxHttpClient extends HttpClient
HttpClient that exposes an RxJava 2.x specific interface.DEFAULT_ERROR_TYPE| Modifier and Type | Method and Description |
|---|---|
static RxHttpClient |
create(java.net.URL url)
Create a new
HttpClient. |
default <I> io.reactivex.Flowable<HttpResponse<ByteBuffer>> |
exchange(HttpRequest<I> request)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher. |
default <I,O> io.reactivex.Flowable<HttpResponse<O>> |
exchange(HttpRequest<I> request,
Argument<O> bodyType)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
<I,O,E> io.reactivex.Flowable<HttpResponse<O>> |
exchange(HttpRequest<I> request,
Argument<O> bodyType,
Argument<E> errorType)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
default <I,O> io.reactivex.Flowable<HttpResponse<O>> |
exchange(HttpRequest<I> request,
java.lang.Class<O> bodyType)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
default io.reactivex.Flowable<HttpResponse<ByteBuffer>> |
exchange(java.lang.String uri)
Perform an HTTP GET request for the given request object emitting the full HTTP response from returned
Publisher. |
default <O> io.reactivex.Flowable<HttpResponse<O>> |
exchange(java.lang.String uri,
java.lang.Class<O> bodyType)
Perform an HTTP GET request for the given request object emitting the full HTTP response from returned
Publisher. |
default <I> io.reactivex.Flowable<java.lang.String> |
retrieve(HttpRequest<I> request)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
default <I,O> io.reactivex.Flowable<O> |
retrieve(HttpRequest<I> request,
Argument<O> bodyType)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
default <I,O,E> io.reactivex.Flowable<O> |
retrieve(HttpRequest<I> request,
Argument<O> bodyType,
Argument<E> errorType)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
default <I,O> io.reactivex.Flowable<O> |
retrieve(HttpRequest<I> request,
java.lang.Class<O> bodyType)
Perform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
default io.reactivex.Flowable<java.lang.String> |
retrieve(java.lang.String uri)
Perform an HTTP GET request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type. |
create, refresh, toBlockingdefault <I,O> io.reactivex.Flowable<HttpResponse<O>> exchange(HttpRequest<I> request, Argument<O> bodyType)
HttpClientPerform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type.
This method will send a Content-Length header and except a content length header the response and is
designed for simple non-streaming exchanges of data
By default the exchange Content-Type is application/json, unless otherwise specified in the passed
HttpRequest
exchange in interface HttpClientI - The request body typeO - The response body typerequest - The HttpRequest to executebodyType - The body typePublisher that emits the full HttpResponse object<I,O,E> io.reactivex.Flowable<HttpResponse<O>> exchange(HttpRequest<I> request, Argument<O> bodyType, Argument<E> errorType)
HttpClientPerform an HTTP request for the given request object emitting the full HTTP response from returned
Publisher and converting the response body to the specified type.
This method will send a Content-Length header and except a content length header the response and is
designed for simple non-streaming exchanges of data
By default the exchange Content-Type is application/json, unless otherwise specified in the passed
HttpRequest
exchange in interface HttpClientI - The request body typeO - The response body typeE - The error typerequest - The HttpRequest to executebodyType - The body typeerrorType - The error typePublisher that emits the full HttpResponse objectdefault <I,O,E> io.reactivex.Flowable<O> retrieve(HttpRequest<I> request, Argument<O> bodyType, Argument<E> errorType)
HttpClientPublisher and converting the response body to the specified type.retrieve in interface HttpClientI - The request body typeO - The response body typeE - The error typerequest - The HttpRequest to executebodyType - The body typeerrorType - The error typePublisher that emits a result of the given typedefault <I> io.reactivex.Flowable<HttpResponse<ByteBuffer>> exchange(HttpRequest<I> request)
HttpClientPublisher.exchange in interface HttpClientI - The request body typerequest - The HttpRequest to executePublisher that emits the full HttpResponse objectdefault io.reactivex.Flowable<HttpResponse<ByteBuffer>> exchange(java.lang.String uri)
HttpClientPublisher.exchange in interface HttpClienturi - The UriPublisher that emits the full HttpResponse objectdefault <O> io.reactivex.Flowable<HttpResponse<O>> exchange(java.lang.String uri, java.lang.Class<O> bodyType)
HttpClientPublisher.exchange in interface HttpClientO - The response body typeuri - The request URIbodyType - The body typePublisher that emits the full HttpResponse objectdefault <I,O> io.reactivex.Flowable<HttpResponse<O>> exchange(HttpRequest<I> request, java.lang.Class<O> bodyType)
HttpClientPublisher and converting the response body to the specified type.exchange in interface HttpClientI - The request body typeO - The response body typerequest - The HttpRequest to executebodyType - The body typePublisher that emits the full HttpResponse objectdefault <I,O> io.reactivex.Flowable<O> retrieve(HttpRequest<I> request, Argument<O> bodyType)
HttpClientPublisher and converting the response body to the specified type.retrieve in interface HttpClientI - The request body typeO - The response body typerequest - The HttpRequest to executebodyType - The body typePublisher that emits a result of the given typedefault <I,O> io.reactivex.Flowable<O> retrieve(HttpRequest<I> request, java.lang.Class<O> bodyType)
HttpClientPublisher and converting the response body to the specified type.retrieve in interface HttpClientI - The request body typeO - The response body typerequest - The HttpRequest to executebodyType - The body typePublisher that emits a result of the given typedefault <I> io.reactivex.Flowable<java.lang.String> retrieve(HttpRequest<I> request)
HttpClientPublisher and converting the response body to the specified type.retrieve in interface HttpClientI - The request body typerequest - The HttpRequest to executePublisher that emits String resultdefault io.reactivex.Flowable<java.lang.String> retrieve(java.lang.String uri)
HttpClientPublisher and converting the response body to the specified type.retrieve in interface HttpClienturi - The URIPublisher that emits String resultstatic RxHttpClient create(@Nullable java.net.URL url)
HttpClient. Note that this method should only be used outside of the context of an application. Within Micronaut use
Inject to inject a client insteadcreate in interface HttpClienturl - The base URL