Skip to content

Commit ae1145c

Browse files
committed
Prepare for release 5.0.0-alpha.17.
1 parent dba12fc commit ae1145c

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,74 @@ Change Log
55

66
See [4.x Change log](https://square.github.io/okhttp/changelogs/changelog_4x/) for the stable version changelogs.
77

8+
## Version 5.0.0-alpha.17
9+
10+
_2025-06-29_
11+
12+
This release stabilizes many APIs for the imminent OkHttp 5.0.0 release.
13+
14+
* New: `TrailersSource`, a public API for HTTP trailers. Production callers shouldn't need this
15+
as the API to read response trailers is unchanged. Testers may use this new stable API to
16+
supply trailers for a `Response`.
17+
18+
* New: `Path.asRequestBody()` is now a non-experimental API.
19+
20+
* New: `FileDescriptor.toRequestBody()` is now a non-experimental API.
21+
22+
* New: Stop using experimental coroutines APIs in our `okhttp-coroutines` artifact.
23+
24+
* Breaking: Move `gzip` from `RequestBody` to `Request.Builder`. This new API handles both
25+
compressing the request body and also adding the corresponding `Content-Encoding` header. Note
26+
that this function is sensitive to when it is called: the response body must be supplied before
27+
it can be compressed.
28+
29+
* Breaking: Remove `AddressPolicy`, `AsyncDns`, and `ConnectionListener` from the public API. We
30+
intend to ship a public API for these features, but we don't want to hold OkHttp 5.0.0 until
31+
those APIs are stable.
32+
33+
* Fix: Change `MockWebServer.close()` to cancel ongoing calls that are blocked on a delay.
34+
35+
* Upgrade: [Okio 3.13.0][okio_3_13_0].
36+
37+
This release also stabilizes many APIs in the `mockwebserver3` artifact that's new in 5.0.
38+
39+
* Breaking: `RecordedRequest.body` is now nullable. Null is used when the request does not have a
40+
body.
41+
42+
* Breaking: `RecordedRequest.chunkSizes` is now nullable. Null is used when the request does not
43+
use chunked encoding. This is different from an empty list - that indicates the request is
44+
chunked but has no data.
45+
46+
* Breaking: Replace `SocketPolicy` with a new type, `SocketEffect`. It splits triggers (request
47+
start, response body, etc.) from effects (closing the socket, closing the stream, etc.).
48+
49+
* Breaking: Rename `RecordedRequest.sequenceNumber` to `exchangeIndex` and introduce
50+
`connectionIndex` on that type. These properties may be useful when testing features like
51+
connection reuse.
52+
53+
* Breaking: Replace our parameters-based JUnit 5 extension with a new annotation, `@StartStop`.
54+
Put this annotation on a `MockWebServer` property and the extension will start it before your
55+
test executes and stop it after it completes. No further configuration is required.
56+
57+
```kotlin
58+
@StartStop val server = MockWebServer()
59+
```
60+
61+
* Breaking: Don't automatically start `MockWebServer` after calls to accessors like `port`. Now
62+
these accessors will throw an `IllegalStateException` if the service has not yet been started.
63+
64+
* Breaking: Decompose the `RecordedRequest.requestLine` into three properties, `method`, `target`,
65+
and `version`. This better suits HTTP/2 where the request line had to be synthesized from
66+
component headers.
67+
68+
* Breaking: Change `RecordedRequest.body` from a mutable `Buffer` to an immutable `ByteString`.
69+
70+
* Breaking: Adopt Okio's new `Socket` interface for `MockResponse.socketHandler`.
71+
72+
Note that any _Breaking_ changes above impact only APIs introduced in earlier 5.0.0-alpha releasees.
73+
We don't break binary compatibility with non-alpha APIs.
74+
75+
876
## Version 5.0.0-alpha.16
977
1078
_2025-05-29_
@@ -531,6 +599,7 @@ release is the version name.
531599
[okio_2_9_0]: https://square.github.io/okio/changelog/#version-290
532600
[okio_3_0_0]: https://square.github.io/okio/changelog/#version-300
533601
[okio_3_12_0]: https://square.github.io/okio/changelog/#version-3120
602+
[okio_3_13_0]: https://square.github.io/okio/changelog/#version-3130
534603
[okio_3_1_0]: https://square.github.io/okio/changelog/#version-310
535604
[okio_3_2_0]: https://square.github.io/okio/changelog/#version-320
536605
[okio_3_7_0]: https://square.github.io/okio/changelog/#version-370

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ configure<SpotlessExtension> {
5252

5353
allprojects {
5454
group = "com.squareup.okhttp3"
55-
version = "5.0.0-SNAPSHOT"
55+
version = "5.0.0-alpha.17"
5656

5757
repositories {
5858
mavenCentral()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy