Skip to content

sttp-client v2.0.0

Compare
Choose a tag to compare
@adamw adamw released this 24 Feb 16:03
· 4110 commits to master since this release

Major changes

  • renamed the group id from com.softwaremill.sttp to com.softwaremill.sttp.client (organization)
  • renamed the main package from com.softwaremill.sttp to sttp.client (see #288)
  • renamed initial request from sttp to basicRequest
  • reworked response-as (see #284)
    • asString now is an Either[String, String] not a String (no assumptions as to the error type)
    • all json integrations return an Either[ResponseError, B] body
  • added websocket support

See also:

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 type
  • Header is a proper type
  • Multipart renamed to Part and generified
  • asFile(overwrite) - removed the overwire parameter
  • QueryFragment(Encoding) in Uri renamed to QuerySegment(Encoding)
  • Uri.parse, Uri.apply removed, replaced with safeApply
  • uri"..." without scheme throws exception
  • SttpBackendStub: instantiated using .stub on "real" backend companion object, instead of using an instance of the "real" backend