Package reactor.netty.http.client
Interface HttpClient.ResponseReceiver<S extends HttpClient.ResponseReceiver<?>>
- All Superinterfaces:
HttpClient.UriConfiguration<S>
- All Known Subinterfaces:
HttpClient.RequestSender
- Enclosing class:
- HttpClient
public static interface HttpClient.ResponseReceiver<S extends HttpClient.ResponseReceiver<?>>
extends HttpClient.UriConfiguration<S>
A response extractor for this configured
HttpClient. Since
HttpClient.ResponseReceiver API returns Flux or Mono,
requesting is always deferred to Publisher.subscribe(Subscriber).-
Method Summary
Modifier and TypeMethodDescriptionresponse()Return the response status and headers asHttpClientResponse<V> Flux<V>response(BiFunction<? super HttpClientResponse, ? super ByteBufFlux, ? extends Publisher<V>> receiver) Extract a response flux from the givenHttpClientResponseand bodyByteBufFlux.<V> Flux<V>responseConnection(BiFunction<? super HttpClientResponse, ? super Connection, ? extends Publisher<V>> receiver) Extract a response flux from the givenHttpClientResponseand underlyingConnection.Return the response body chunks asByteBufFlux.<V> Mono<V>responseSingle(BiFunction<? super HttpClientResponse, ? super ByteBufMono, ? extends Mono<V>> receiver) Extract a response mono from the givenHttpClientResponseand aggregated bodyByteBufMono.Methods inherited from interface reactor.netty.http.client.HttpClient.UriConfiguration
uri, uri, uri
-
Method Details
-
response
Mono<HttpClientResponse> response()Return the response status and headers asHttpClientResponseWill automatically close the response if necessary.
Note: Will automatically close low-level network connection after returned
Monoterminates or is being cancelled.- Returns:
- the response status and headers as
HttpClientResponse
-
response
<V> Flux<V> response(BiFunction<? super HttpClientResponse, ? super ByteBufFlux, ? extends Publisher<V>> receiver) Extract a response flux from the givenHttpClientResponseand bodyByteBufFlux.Will automatically close the response if necessary after the returned
Fluxterminates or is being cancelled. -
responseConnection
<V> Flux<V> responseConnection(BiFunction<? super HttpClientResponse, ? super Connection, ? extends Publisher<V>> receiver) Extract a response flux from the givenHttpClientResponseand underlyingConnection.The connection will not automatically
DisposableChannel.dispose()and manual interaction with this method might be necessary if the remote never terminates itself. -
responseContent
ByteBufFlux responseContent()Return the response body chunks asByteBufFlux.Will automatically close the response if necessary after the returned
Fluxterminates or is being cancelled.- Returns:
- the response body chunks as
ByteBufFlux.
-
responseSingle
<V> Mono<V> responseSingle(BiFunction<? super HttpClientResponse, ? super ByteBufMono, ? extends Mono<V>> receiver) Extract a response mono from the givenHttpClientResponseand aggregated bodyByteBufMono.Will automatically close the response if necessary after the returned
Monoterminates or is being cancelled.
-