sttp-client v2.0.0
Major changes
- renamed the group id from
com.softwaremill.sttp
tocom.softwaremill.sttp.client
(organization) - renamed the main package from
com.softwaremill.sttp
tosttp.client
(see #288) - renamed initial request from
sttp
tobasicRequest
- reworked response-as (see #284)
asString
now 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! StatusCode
is a proper typeHeader
is a proper typeMultipart
renamed to Part and generifiedasFile(overwrite)
- removed theoverwire
parameterQueryFragment(Encoding)
inUri
renamed toQuerySegment(Encoding)
Uri.parse
,Uri.apply
removed, replaced withsafeApply
uri"..."
without scheme throws exceptionSttpBackendStub
: instantiated using .stub on "real" backend companion object, instead of using an instance of the "real" backend