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 |
---|---|
Mono<HttpClientResponse> |
response()
Return the response status and headers as
HttpClientResponse |
<V> Flux<V> |
response(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufFlux,? extends Publisher<V>> receiver)
Extract a response flux from the given
HttpClientResponse and body
ByteBufFlux . |
<V> Flux<V> |
responseConnection(java.util.function.BiFunction<? super HttpClientResponse,? super Connection,? extends Publisher<V>> receiver)
Extract a response flux from the given
HttpClientResponse and
underlying Connection . |
ByteBufFlux |
responseContent()
Return the response body chunks as
ByteBufFlux . |
<V> Mono<V> |
responseSingle(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufMono,? extends Mono<V>> receiver)
Extract a response mono from the given
HttpClientResponse and
aggregated body ByteBufMono . |
uri, uri
Mono<HttpClientResponse> response()
HttpClientResponse
Will automatically close the response if necessary.
HttpClientResponse
<V> Flux<V> response(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufFlux,? extends Publisher<V>> receiver)
HttpClientResponse
and body
ByteBufFlux
.
Will automatically close the response if necessary after the returned
Flux
terminates or is being cancelled.
<V> Flux<V> responseConnection(java.util.function.BiFunction<? super HttpClientResponse,? super Connection,? extends 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.
ByteBufFlux responseContent()
ByteBufFlux
.
Will automatically close the response if necessary after the returned
Flux
terminates or is being cancelled.
ByteBufFlux
.<V> Mono<V> responseSingle(java.util.function.BiFunction<? super HttpClientResponse,? super ByteBufMono,? extends Mono<V>> receiver)
HttpClientResponse
and
aggregated body ByteBufMono
.
Will automatically close the response if necessary after the returned
Mono
terminates or is being cancelled.