Skip to content
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

Adapt for okhttp3 4.x #1653

Closed

Conversation

droustchev-pd
Copy link
Contributor

@droustchev-pd droustchev-pd commented Apr 24, 2023

This PR is a follow up on spinnaker/kork#1044, where OkHttp was updated to the latest 4.x version. It was primarily motivated by square/okhttp#6738 and is based on the official upgrade instructions: https://square.github.io/okhttp/changelogs/upgrading_to_okhttp_4/

@droustchev-pd droustchev-pd force-pushed the upgrade-okhttp-4.x branch 2 times, most recently from cf2fa83 to 64ce264 Compare April 25, 2023 18:36
@@ -135,7 +136,7 @@ class ProxyController(

val body = if (HttpMethod.permitsRequestBody(method) && request.contentType != null) {
RequestBody.create(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These few lines can become:

request.reader.lines().collect(Collectors.joining(System.lineSeparator())).toRequestBody(request.contentType.toMediaType())

@dbyron-sf
Copy link
Contributor

included in #1667

@dbyron-sf dbyron-sf closed this Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants