-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replacing OkHttpClient with Java 11 HttpClient #1218
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
1714ce8
to
65ac884
Compare
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
@artursouza @cicoyle and @salaboy please take a look and let me know your thoughts. We are still using |
@artursouza I might need your help, as far as I can see the only failing test |
Signed-off-by: Artur Ciocanu <[email protected]>
Signed-off-by: Artur Ciocanu <[email protected]>
int maxRequests = properties.getValue(HTTP_CLIENT_MAX_REQUESTS); | ||
Executor executor = Executors.newFixedThreadPool(maxRequests); | ||
HTTP_CLIENT = HttpClient.newBuilder() | ||
.executor(executor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When connecting to localhost
OkHttpClient
use HTTP 1.1
so we need to use the same HTTP protocol version.
@artursouza and @cicoyle with @ThomasVitale's help I have managed to fix the ITs. Everything is 🟢. Could you please review. |
Description
A few months ago we have upgraded Dapr Java SDK to use Java 11. Java 11 has native support for HTTP client. The proposal is to use the Java 11 HttpClient instead of OkHttpClient. While OkHttpClient is a nice library it adds yet another dependency that we have to manage and upgrade. Also the fact that OkHttpClient uses Kotlin adds another layer of complications since the Kotlin version in OkHttpClient might conflict with our customers Kotlin stdlib.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1217
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: