* Don't leak response bodies in executeAsync
Also make callers opt in to an unstable coroutines API. If the resource
cleanup coroutines API changes, we'll have to change this API.
Remove the OkHttp experimental API. This is a good enough API as far
as OkHttp is concerned.
* Spotless
* Mechanically tag all new APIs as @ExperimentalOkHttpApi
In a follow-up PR I intend to remove the annotation on any
API that we're willing to commit to for OkHttp 5.0.0.
In a follow-up PR I'd also like to hide all remaining
APIs from Java langauge callers.
* Opt-in ExperimentalOkHttpApi for Android projects too
---------
Co-authored-by: Benoit Quenaudon <benoit@quenaudon.com>
* Switch to assertk.fail
* Use assertFailsWith
* More assertFailsWith
* Use more assertFailsWith
* More assertFailsWith
* More assertFailsWith
* Native image dependencies
* Move JUnit dependency
* Don't lock in a specific implementation class
* Missing finally
* Switch back to the kotlin JVM plugin
This does a ton of file moves from jvmMain to main, and jvmTest to test.
* Don't use AnimalSniffer on okcurl
* Use assertk more (#8150)
* Switch to a Builder for mockwebserver3.MockResponse
* Migrate lots of tests to MockResponse.Builder
* Improve some code style
* Follow naming conventions in MockResponse.Builder
* Apply side-effects for inTunnel=true
* Update the API
* Add a proper Kotlin constructor for Request
This turns out to be very useful throughout our test suite.
* Dump updated API
* Fix multipleTags Kotlin conversion
This is a source-incompatible API change. In particular, Response.body(null)
is no longer source-compatible for Kotlin source.
The upside is tremendous: no need for callers to use !! on Response.body
on every single API call. In the rare cases where a Response doesn't have
a body we use a runtime error. This is unlikely to cause problems in
practice; users don't have reason to read the response body on supporting
responses.