Skip to content

Bump okhttp from 4.12.0 to 5.1.0 #1099

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

Merged
merged 2 commits into from
Jul 8, 2025
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 8, 2025

Bumps okhttp from 4.12.0 to 5.1.0.
Updates com.squareup.okhttp3:okhttp from 4.12.0 to 5.1.0

Changelog

Sourced from com.squareup.okhttp3:okhttp's changelog.

Version 5.1.0

2025-07-07

  • New: Response.peekTrailers(). When we changed Response.trailers() to block instead of throwing 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 that capability.

  • Fix: Don't crash on trailers() if the response doesn't have a body. We broke [Retrofit] users who read the trailers on the raw() OkHttp response, after its body was decoded.

Version 5.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 to migrate.)

Coordinate Package Name Description
com.squareup.okhttp3:mockwebserver3:5.0.0 mockwebserver3 Core module. No JUnit dependency!
com.squareup.okhttp3:mockwebserver3-junit4:5.0.0 mockwebserver3.junit4 Optional JUnit 4 integration.
com.squareup.okhttp3:mockwebserver3-junit5:5.0.0 mockwebserver3.junit5 Optional JUnit 5 integration.
com.squareup.okhttp3:mockwebserver:5.0.0 okhttp3.mockwebserver Obsolete. Depends on JUnit 4.

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:

val request = Request(
  url = "https://cash.app/".toHttpUrl(),
)

OkHttp now supports [GraalVM].

Here’s what has changed since 5.0.0-alpha.17:

... (truncated)

Commits

Updates com.squareup.okhttp3:logging-interceptor from 4.12.0 to 5.1.0

Changelog

Sourced from com.squareup.okhttp3:logging-interceptor's changelog.

Version 5.1.0

2025-07-07

  • New: Response.peekTrailers(). When we changed Response.trailers() to block instead of throwing 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 that capability.

  • Fix: Don't crash on trailers() if the response doesn't have a body. We broke [Retrofit] users who read the trailers on the raw() OkHttp response, after its body was decoded.

Version 5.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 to migrate.)

Coordinate Package Name Description
com.squareup.okhttp3:mockwebserver3:5.0.0 mockwebserver3 Core module. No JUnit dependency!
com.squareup.okhttp3:mockwebserver3-junit4:5.0.0 mockwebserver3.junit4 Optional JUnit 4 integration.
com.squareup.okhttp3:mockwebserver3-junit5:5.0.0 mockwebserver3.junit5 Optional JUnit 5 integration.
com.squareup.okhttp3:mockwebserver:5.0.0 okhttp3.mockwebserver Obsolete. Depends on JUnit 4.

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:

val request = Request(
  url = "https://cash.app/".toHttpUrl(),
)

OkHttp now supports [GraalVM].

Here’s what has changed since 5.0.0-alpha.17:

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Jul 8, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Pillarbox Jul 8, 2025
@MGaetan89 MGaetan89 moved this from 📋 Backlog to 🍿 Code Review in Pillarbox Jul 8, 2025
Copy link

github-actions bot commented Jul 8, 2025

Code Coverage

Overall Project 49.81% 🟢

There is no coverage information present for the Files changed

@dependabot dependabot bot force-pushed the dependabot/gradle/okhttp-5.1.0 branch from 4667775 to 06ab892 Compare July 8, 2025 08:06
Bumps `okhttp` from 4.12.0 to 5.1.0.

Updates `com.squareup.okhttp3:okhttp` from 4.12.0 to 5.1.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.12.0...parent-5.1.0)

Updates `com.squareup.okhttp3:logging-interceptor` from 4.12.0 to 5.1.0
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.12.0...parent-5.1.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: com.squareup.okhttp3:logging-interceptor
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/gradle/okhttp-5.1.0 branch from 06ab892 to 91e25ca Compare July 8, 2025 08:17
Copy link
Member

@MGaetan89 MGaetan89 left a comment

Choose a reason for hiding this comment

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

LGTM
@StaehliJ can you have a look? I removed an OkHttp's internal API usage that we had

@MGaetan89 MGaetan89 requested a review from StaehliJ July 8, 2025 08:40
@StaehliJ StaehliJ added this pull request to the merge queue Jul 8, 2025
Merged via the queue into main with commit 8bb2e00 Jul 8, 2025
10 checks passed
@StaehliJ StaehliJ deleted the dependabot/gradle/okhttp-5.1.0 branch July 8, 2025 14:33
@github-project-automation github-project-automation bot moved this from 🍿 Code Review to ✅ Done in Pillarbox Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file java Pull requests that update Java code
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants