Skip to content

Commit ec5774e

Browse files
committed
Polishing
Closes gh-26577
1 parent 962ec38 commit ec5774e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFunction.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,10 +24,13 @@
2424
*
2525
* <p>For example:
2626
* <pre class="code">
27-
* ExchangeFunction exchangeFunction = ExchangeFunctions.create(new ReactorClientHttpConnector());
28-
* ClientRequest request = ClientRequest.create(HttpMethod.GET, URI.create("https://example.com/resource")).build();
27+
* ExchangeFunction exchangeFunction =
28+
* ExchangeFunctions.create(new ReactorClientHttpConnector());
2929
*
30-
* Mono&lt;String&gt; result = exchangeFunction
30+
* URI url = URI.create("https://example.com/resource");
31+
* ClientRequest request = ClientRequest.create(HttpMethod.GET, url).build();
32+
*
33+
* Mono&lt;String&gt; bodyMono = exchangeFunction
3134
* .exchange(request)
3235
* .flatMap(response -> response.bodyToMono(String.class));
3336
* </pre>
@@ -39,15 +42,15 @@
3942
public interface ExchangeFunction {
4043

4144
/**
42-
* Exchange the given request for a response mono.
45+
* Exchange the given request for a {@link ClientResponse} promise.
4346
* @param request the request to exchange
4447
* @return the delayed response
4548
*/
4649
Mono<ClientResponse> exchange(ClientRequest request);
4750

4851
/**
49-
* Filters this exchange function with the given {@code ExchangeFilterFunction}, resulting in a
50-
* filtered {@code ExchangeFunction}.
52+
* Filter the exchange function with the given {@code ExchangeFilterFunction},
53+
* resulting in a filtered {@code ExchangeFunction}.
5154
* @param filter the filter to apply to this exchange
5255
* @return the filtered exchange
5356
* @see ExchangeFilterFunction#apply(ExchangeFunction)

0 commit comments

Comments
 (0)