Rename WebClientBuilder.requestFactory(…) to httpConnectorFactory(…)
Closes gh-517
This commit is contained in:
@@ -117,8 +117,10 @@ public class WebClientBuilder {
|
||||
*
|
||||
* @param httpConnector the supplier for the HTTP connector.
|
||||
* @return {@code this} {@link WebClientBuilder}.
|
||||
* @since 2.2.1
|
||||
*/
|
||||
public WebClientBuilder requestFactory(Supplier<ClientHttpConnector> httpConnector) {
|
||||
public WebClientBuilder httpConnectorFactory(
|
||||
Supplier<ClientHttpConnector> httpConnector) {
|
||||
|
||||
Assert.notNull(httpConnector, "Supplier of ClientHttpConnector must not be null");
|
||||
|
||||
@@ -126,6 +128,20 @@ public class WebClientBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link Supplier} of {@link ClientHttpConnector} that should be called each
|
||||
* time we {@link #build()} a new {@link WebClient} instance.
|
||||
*
|
||||
* @param httpConnector the supplier for the HTTP connector.
|
||||
* @return {@code this} {@link WebClientBuilder}.
|
||||
* @deprecated since 2.2.1 as the name is wrong, use
|
||||
* {@link #httpConnectorFactory(Supplier)}
|
||||
*/
|
||||
@Deprecated
|
||||
public WebClientBuilder requestFactory(Supplier<ClientHttpConnector> httpConnector) {
|
||||
return httpConnectorFactory(httpConnector);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a default header that will be set if not already present on the outgoing
|
||||
* {@link HttpRequest}.
|
||||
|
||||
Reference in New Issue
Block a user