WebClient.
For example:
ExchangeFunction exchangeFunction =
ExchangeFunctions.create(new ReactorClientHttpConnector());
URI url = URI.create("https://example.com/resource");
ClientRequest request = ClientRequest.create(HttpMethod.GET, url).build();
Mono<String> bodyMono = exchangeFunction
.exchange(request)
.flatMap(response -> response.bodyToMono(String.class));
| Modifier and Type | Method and Description |
|---|---|
| public Mono | Returns: the delayed responsethe request to exchange request)Exchange the given request for a |
| public default ExchangeFunction | Returns: the filtered exchangethe filter to apply to this exchange filter)Filter the exchange function with the given |
| exchange | back to summary |
|---|---|
| public Mono Exchange the given request for a Note When calling this method from an
| |
| filter | back to summary |
|---|---|
| public default ExchangeFunction filter(ExchangeFilterFunction filter) Filter the exchange function with the given
| |