This is the first milestone release for the upcoming sttp 4. The focus of this release is to simplify the types used by sttp, improve type inference and error reporting, while keeping the same API.
Hence the good news: if you are using sttp 3, your code should work with minimal changes. These should concern mainly the types, and code organization (package names). If you'd like to help us and try out this release, please do - and report anything that has been unexpectedly broken.
sttp 4 uses a new organization (com.softwaremill.sttp.client4
) and package name (sttp.client4
), so you can safely use both v3 and v4 in a single codebase.
If you'd like to test the new release, check out the updated quickstart documentation page.
And finally, for feedback regarding this release, or suggestions on what to improve in further milestone releases (NOW is the best time to let us know what you found irritating or broken in sttp v3), please let us know on the community forum. Thank you!
Thanks to @adpi2 for the PR transforming how we define requests & backends.
Non-exhaustive list of breaking changes
- remove
RequestT
, introducePartialRequest
,Request
,StreamRequest
,WebSocketRequest
,WebSocketStreamRequest
- rename
SttpBackend
toGenericBackend
, introduce subtypes:Backend
,StreamBackend
,SyncBackend
etc. - rename
SttpBackendOptions
toBackendOptions
- rename
Backend.responseMonad
toBackend.monad
request.send(backend)
is now the only preferred method of sending a request- remove
SimpleHttpClient
- move
HttpClientBackend
to a dedicated package, introduceDefaultSyncBackend
andDefaultFutureBackend
What’s Changed
- Reformat using new scalafmt rules (#1764) @adamw
- Introduce default backends (#1763) @adamw
- Categorize backends into packages (#1762) @adamw
- Rename "responseMonad" to "monad" in Backend (#1758) @adamw
- Add a parameterless send() extension method for quick requests (#1761) @adamw
- Fix try & either backends (#1760) @adamw
- Remove TryHttpURLConnectionBackend (#1759) @adamw
- Remove deprecated exceptions type aliases (#1757) @adamw
- Drop Scala 2.11 (#1750) @adamw
- Drop SimpleHttpClient (#1749) @adamw
- Rename the client3 package to client4, as well as the artifact's organization (#1748) @adamw
- [Proposal] Add type hierarchy of requests and backends (#1703) @adpi2
Dependency updates
- Update upickle to 3.0.0 (#1755) @softwaremill-ci
- Update http4s-blaze-client to 0.23.14 (#1756) @softwaremill-ci
- Update jsoniter-scala-core, ... to 2.21.3 (#1754) @softwaremill-ci
- Update opentelemetry-api, ... to 1.24.0 (#1753) @softwaremill-ci
- Update circe-core, circe-generic, ... to 0.14.5 (#1752) @softwaremill-ci
- Update jsoniter-scala-core, ... to 2.13.39 (#1751) @softwaremill-ci
- Update http4s-ember-client to 0.23.18 (#1747) @softwaremill-ci