Skip to content

Commit 4d70b83

Browse files
committed
Improve javadoc of ClientHttpRequestFactories
Closes gh-36267
1 parent 7ae030a commit 4d70b83

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/ClientHttpRequestFactories.java

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,14 @@ private ClientHttpRequestFactories() {
6161
}
6262

6363
/**
64-
* Return a new {@link ClientHttpRequestFactory} instance using the most appropriate
65-
* implementation.
64+
* Return a {@link ClientHttpRequestFactory} implementation with the given
65+
* {@code settings} applied. The first of the following implementations whose
66+
* dependencies {@link ClassUtils#isPresent are available} is returned:
67+
* <ol>
68+
* <li>{@link HttpComponentsClientHttpRequestFactory}</li>
69+
* <li>{@link OkHttp3ClientHttpRequestFactory}</li>
70+
* <li>{@link SimpleClientHttpRequestFactory}</li>
71+
* </ol>
6672
* @param settings the settings to apply
6773
* @return a new {@link ClientHttpRequestFactory}
6874
*/
@@ -78,8 +84,17 @@ public static ClientHttpRequestFactory get(ClientHttpRequestFactorySettings sett
7884
}
7985

8086
/**
81-
* Return a new {@link ClientHttpRequestFactory} of the given type, applying
82-
* {@link ClientHttpRequestFactorySettings} using reflection if necessary.
87+
* Return a new {@link ClientHttpRequestFactory} of the given
88+
* {@code requestFactoryType}, applying {@link ClientHttpRequestFactorySettings} using
89+
* reflection if necessary. The following implementations are supported without the
90+
* use of reflection:
91+
* <ul>
92+
* <li>{@link HttpComponentsClientHttpRequestFactory}</li>
93+
* <li>{@link OkHttp3ClientHttpRequestFactory}</li>
94+
* <li>{@link SimpleClientHttpRequestFactory}</li>
95+
* </ul>
96+
* A {@code requestFactoryType} of {@link ClientHttpRequestFactory} is equivalent to
97+
* calling {@link #get(ClientHttpRequestFactorySettings)}.
8398
* @param <T> the {@link ClientHttpRequestFactory} type
8499
* @param requestFactoryType the {@link ClientHttpRequestFactory} type
85100
* @param settings the settings to apply

0 commit comments

Comments
 (0)