public static interface HttpClient.ResponseReceiver<S extends HttpClient.ResponseReceiver<?>> extends HttpClient.UriConfiguration<S>
HttpClient
. Since
HttpClient.ResponseReceiver
API returns Flux
or Mono
,
requesting is always deferred to Publisher.subscribe(Subscriber)
.Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<HttpClientResponse> |
response()
Return the response status and headers as
HttpClientResponse |
<V> reactor.core.publisher.Flux<V> |
response(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufFlux,? extends org.reactivestreams.Publisher<V>> receiver)
Extract a response flux from the given
HttpClientResponse and body
ByteBufFlux . |
<V> reactor.core.publisher.Flux<V> |
responseConnection(java.util.function.BiFunction<? super HttpClientResponse,? super Connection,? extends org.reactivestreams.Publisher<V>> receiver)
Extract a response flux from the given
HttpClientResponse and
underlying Connection . |
ByteBufFlux |
responseContent()
Return the response body chunks as
ByteBufFlux . |
<V> reactor.core.publisher.Mono<V> |
responseSingle(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufMono,? extends reactor.core.publisher.Mono<V>> receiver)
Extract a response mono from the given
HttpClientResponse and
aggregated body ByteBufMono . |
uri, uri, uri
reactor.core.publisher.Mono<HttpClientResponse> response()
HttpClientResponse
Will automatically close the response if necessary.
HttpClientResponse
<V> reactor.core.publisher.Flux<V> response(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufFlux,? extends org.reactivestreams.Publisher<V>> receiver)
HttpClientResponse
and body
ByteBufFlux
.
Will automatically close the response if necessary after the returned
Flux
terminates or is being cancelled.
V
- the extracted flux typereceiver
- extracting receiverFlux
forwarding the returned Publisher
sequence<V> reactor.core.publisher.Flux<V> responseConnection(java.util.function.BiFunction<? super HttpClientResponse,? super Connection,? extends org.reactivestreams.Publisher<V>> receiver)
HttpClientResponse
and
underlying Connection
.
The connection will not automatically DisposableChannel.dispose()
and
manual interaction with this method might be necessary if the remote never
terminates itself.
V
- the extracted flux typereceiver
- extracting receiverFlux
forwarding the returned Publisher
sequenceByteBufFlux responseContent()
ByteBufFlux
.
Will automatically close the response if necessary after the returned
Flux
terminates or is being cancelled.
ByteBufFlux
.<V> reactor.core.publisher.Mono<V> responseSingle(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufMono,? extends reactor.core.publisher.Mono<V>> receiver)
HttpClientResponse
and
aggregated body ByteBufMono
.
Will automatically close the response if necessary after the returned
Mono
terminates or is being cancelled.
V
- the extracted mono typereceiver
- extracting receiverMono
forwarding the returned Mono
result