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(BiFunction<? super HttpClientResponse,? super ByteBufFlux,? extends Publisher<V>> receiver)
Extract a response flux from the given
HttpClientResponse and body
ByteBufFlux . |
<V> Flux<V> |
responseConnection(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(BiFunction<? super HttpClientResponse,? super ByteBufMono,? extends Mono<V>> receiver)
Extract a response mono from the given
HttpClientResponse and
aggregated body ByteBufMono . |
uri, uri, uri
Mono<HttpClientResponse> response()
HttpClientResponse
Will automatically close the response if necessary.
Note: Will automatically close low-level network connection after returned
Mono
terminates or is being cancelled.
HttpClientResponse
<V> Flux<V> response(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(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(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.