FBibonne / spring-httpexchange-extension

Spring Framework extension to enhance the @HttpExchange annotation for Rest Clients
0 stars 0 forks source link

Find a convenient http client #9

Open FBibonne opened 2 hours ago

FBibonne commented 2 hours ago

Until now, the lib uses OkHttp client which is a very performant http client in java. By the way, it implements transparently http body compression, easily http caching and native http2. But OkHttp client adapter for Spring rest client is deprecated. Thus we must find an other http client. Apache http components client is a serious candidate.

FBibonne commented 2 hours ago

Notice : dependencies required (and sizes)

org.apache.httpcomponents.client5:httpclient5 + httpclient5-cache
[INFO] \- org.apache.httpcomponents.client5:httpclient5:jar:5.4.1             908
[INFO]    +- org.apache.httpcomponents.core5:httpcore5:jar:5.2.5              855
[INFO]    +- org.apache.httpcomponents.core5:httpcore5-h2:jar:5.2.5           237
[INFO] \- org.apache.httpcomponents.client5:httpclient5-cache:jar:5.3.1       246

[INFO] \- com.squareup.okhttp3:okhttp:jar:5.0.0-alpha.14                      931
[INFO]    +- com.squareup.okio:okio-jvm:jar:3.9.0                             372
[INFO]    \- org.jetbrains.kotlin:kotlin-stdlib:jar:1.9.25                   1718
[INFO]       \- org.jetbrains:annotations:jar:13.0                             17