1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-21 18:40:53 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Yuri Schimke
a16dcecfeb Allow constructor injection of MockWebServer (#8191) 2024-01-14 10:20:09 +00:00
Jesse Wilson
a228fd64cc Reformat with Spotless (#8180)
* Enable spotless

* Run spotlessApply

* Fixup trimMargin

* Re-run spotlessApply
2024-01-07 20:13:22 -05:00
Jesse Wilson
23d67c304f Switch to assertFailsWith (#8177)
* 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
2024-01-06 00:31:00 -05:00
Jesse Wilson
c056530682 Switch back to the kotlin JVM plugin (#8149)
* 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)
2023-12-20 18:27:07 -05:00
Jesse Wilson
6b7b611308 Remove expect/actuals (#8147)
* Remove expect/actuals from okcurl

* Remove expect/actuals from okhttp-coroutines

* Remove expect/actuals from okhttp

* Remove expect/actuals from okhttp-testing-support

* Fixup build scripts
2023-12-19 07:37:45 -05:00
Benoît Quenaudon
68105a4832 Removing all JS variants (#8145) 2023-12-18 10:49:23 -05:00
HyunWoo Lee (Nunu Lee)
30780c879b Add explicit argument name in use lambda function in README.md (#8097) 2023-11-09 10:47:27 -05:00
Yuri Schimke
95cb15ab4d Disable javadoc (#8025) 2023-09-16 10:38:35 +01:00
Jesse Wilson
3ea6b81e5c Make SocketPolicy a sealed interface (#7610)
* Make SocketPolicy a sealed interface

* Dump APIs
2023-01-02 15:13:13 -05:00
Jesse Wilson
fe15ccda5b Switch to a Builder for mockwebserver3.MockResponse (#7578)
* 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
2022-12-28 10:13:49 -05:00
Yuri Schimke
69ae7f3e10 Fix lifecycle for Junit 5 extension. (#7392) 2022-08-16 13:01:55 +03:00
Yuri Schimke
58ee1ce170 Revert downgrade to 1.4 for gradle reasons (#7391)
* Revert "Downgrade to kotlin apiVersion 1.4 (#7267)"
* Revert "Improve runtime compatibility with kotlin 1.5.31 (#7343)"
* Revert "Remove usage of toDuration() (#7329)"
2022-07-25 17:57:09 +01:00
Yuri Schimke
6ad9fb12b6 Downgrade to kotlin apiVersion 1.4 (#7267)
* Test against kotlin 1.4

* Compile down to Kotlin 1.4

* Fix to use the invariant locale for lowercase

* Fix to use the invariant locale for lowercase
2022-06-08 10:44:30 -04:00
Jesse Wilson
79f50e1911 Add a proper Kotlin constructor for Request (#7208)
* 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
2022-04-04 09:44:43 -04:00
Jesse Wilson
b9267b0ce7 Make Response.body non-null (#7205)
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.
2022-04-02 13:17:00 -04:00
Yuri Schimke
ab5cadd7f8 Fix coroutines publishing (#7150) 2022-03-09 21:01:54 +00:00
Yuri Schimke
0d2f2eb346 Coroutines module. (#7142)
Implementation of an extension method which is used directly on JVM, and shadows an implementation
directly in Call on other platforms.
2022-03-06 15:31:31 +00:00