-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update okhttp monorepo to v5 (major) #4996
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Ship it!
e11be25
to
bc17ed7
Compare
YouTrack: KTOR-8652 Upgrade OkHttp to version 5.0.0 |
This PR contains the following updates:
4.12.0
->5.1.0
4.12.0
->5.1.0
Release Notes
square/okhttp (com.squareup.okhttp3:okhttp-sse)
v5.1.0
2025-07-07
New:
Response.peekTrailers()
. When we changedResponse.trailers()
to block instead ofthrowing in 5.0.0, we inadvertently removed the ability for callers to peek the trailers
(by catching the
IllegalStateException
if they weren't available). This new API restores thatcapability.
Fix: Don't crash on
trailers()
if the response doesn't have a body. We broke [Retrofit] userswho read the trailers on the
raw()
OkHttp response, after its body was decoded.v5.0.0
2025-07-02
This is our first stable release of OkHttp since 2023. Here's the highlights if you're upgrading
from OkHttp 4.x:
OkHttp is now packaged as separate JVM and Android artifacts. This allows us to offer
platform-specific features and optimizations. If your build system handles [Gradle module metadata],
this change should be automatic.
MockWebServer has a new coordinate and package name. We didn’t like that our old artifact
depends on JUnit 4 so the new one doesn’t. It also has a better API built on immutable values. (We
intend to continue publishing the old
okhttp3.mockwebserver
artifact so there’s no urgency tomigrate.)
OkHttp now supports Happy Eyeballs ([RFC 8305][rfc_8305]) for IPv4+IPv6 networks. It attempts
both IPv6 and IPv4 connections concurrently, keeping whichever connects first.
We’ve improved our Kotlin APIs. You can skip the builder:
OkHttp now supports [GraalVM].
Here’s what has changed since 5.0.0-alpha.17:
NoSuchMethodError
when using OkHttp with the Sentry SDK.okhttp3.mockwebserver.RecordedRequest.path
property. Weinadvertently changed this behavior when we introduced the
mockwebserver3
API.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only on Sunday and Saturday ( * * * * 0,6 ) (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.