sttp-client v2.0.0
Major changes
- renamed the group id from
com.softwaremill.sttptocom.softwaremill.sttp.client(organization) - renamed the main package from
com.softwaremill.sttptosttp.client(see #288) - renamed initial request from
sttptobasicRequest - reworked response-as (see #284)
asStringnow is anEither[String, String]not aString(no assumptions as to the error type)- all json integrations return an
Either[ResponseError, B]body
- added websocket support
See also:
- migrating to sttp client 2.x and tapir 2.x
- sttp2: an overview of proposed changes
- Websockets in Scala using sttp
Minor changes
- removed Request.parseResponseIf
- removed Response.unsafeBody
- redirect loops now throw an exception
- reduce import conflicts with cats:
- rename Id to Identity (to make working w/ cats easier)
- move MonadError to another package
- cats, zio, monix, scalaz backends now return results wrapped in IO/Task when creating a backend
- backend.close returns a
F[Unit]- watch out if you are using lazy wrappers! StatusCodeis a proper typeHeaderis a proper typeMultipartrenamed to Part and generifiedasFile(overwrite)- removed theoverwireparameterQueryFragment(Encoding)inUrirenamed toQuerySegment(Encoding)Uri.parse,Uri.applyremoved, replaced withsafeApplyuri"..."without scheme throws exceptionSttpBackendStub: instantiated using .stub on "real" backend companion object, instead of using an instance of the "real" backend