File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
src/main/java/org/apache/hc/client5/migration/examples
src/site/markdown/httpcomponents-client-5.4.x/migration-guide Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 4141 <maven .compiler.source>1.8</maven .compiler.source>
4242 <maven .compiler.target>1.8</maven .compiler.target>
4343 <hc4 .client.version>4.5.13</hc4 .client.version>
44- <hc5 .client.version>5.3 </hc5 .client.version>
44+ <hc5 .client.version>5.4.2 </hc5 .client.version>
4545 <jackson .version>2.12.6.1</jackson .version>
46- <asyncjson .version>0.2 .0</asyncjson .version>
46+ <asyncjson .version>0.4 .0</asyncjson .version>
4747 </properties >
4848
4949 <dependencies >
Original file line number Diff line number Diff line change 3636import org .apache .hc .client5 .http .impl .io .PoolingHttpClientConnectionManager ;
3737import org .apache .hc .client5 .http .impl .io .PoolingHttpClientConnectionManagerBuilder ;
3838import org .apache .hc .client5 .http .protocol .HttpClientContext ;
39- import org .apache .hc .client5 .http .ssl .SSLConnectionSocketFactoryBuilder ;
39+ import org .apache .hc .client5 .http .ssl .ClientTlsStrategyBuilder ;
40+ import org .apache .hc .client5 .http .ssl .TlsSocketStrategy ;
4041import org .apache .hc .core5 .http .ClassicHttpRequest ;
4142import org .apache .hc .core5 .http .ContentType ;
4243import org .apache .hc .core5 .http .HttpEntity ;
@@ -56,7 +57,7 @@ public class HttpClient5ClassicExample {
5657
5758 public static void main (String ... args ) throws Exception {
5859 PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder .create ()
59- .setSSLSocketFactory ( SSLConnectionSocketFactoryBuilder .create ()
60+ .setTlsSocketStrategy (( TlsSocketStrategy ) ClientTlsStrategyBuilder .create ()
6061 .setSslContext (SSLContexts .createSystemDefault ())
6162 .setTlsVersions (TLS .V_1_3 )
6263 .build ())
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ There are also some important differences with URL normalization and encoding.
4343
4444 ``` java
4545 PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder . create()
46- .setSSLSocketFactory( SSLConnectionSocketFactoryBuilder . create()
46+ .setTlsSocketStrategy(( TlsSocketStrategy ) ClientTlsStrategyBuilder . create()
4747 .setSslContext(SSLContexts . createSystemDefault())
4848 .setTlsVersions(TLS. V_1_3 )
4949 .build())
You can’t perform that action at this time.
0 commit comments