Releases: softwaremill/sttp
v3.0.0-RC5
This is a preview release, containing most of the functionality planned for sttp v3. The code passes all tests, however the API might change.
sttp client v3 uses a new package name (sttp.client3
) and organization (com.softwaremill.sttp.client3
). This way old and new sttp client versions can be used side-by-side. Make sure to update your imports and build dependencies!
Documentation is updated for the new version.
Breaking changes since v2:
SttpBackend
trait
The trait now has 2, instead of 3 parameters. The "default" case of a backend with no additional capabilities changed:
SttpBackend[F, Nothing, NothingT] --> SttpBackend[F, Any]
The second type parameter now contains a list of supported additional capabilities. This can include:
- an implementation of
Streams
WebSockets
Finally, the type of supported streams is not given directly, but wrapped in a Streams
object. For example, the types of the AkkaHttpBackend
and AsyncHttpClientZioBackend
backends now are:
SttpBackend[Future, AkkaStreams with WebSockets]
SttpBackend[Task, ZioStreams with WebSockets]
Request
type
The type describing a request has undergone similar changes, with the last type parameter specifying the requirements that a backend must meet in order of the request to be sent. The "default" description of a request which doesn't use websockets or streams changed:
Request[T, Nothing] -> Request[T, Any]
Similarly, the type of ResponseAs
changed.
The Request.send()
method, which used an implicit SttpBackend
is deprecated. Instead, use Request.send(backend)
, giving the backend explicitly.
SttpBackendStub
- method name change:
thenRespondWrapped -> thenRespondF
- when nothing is stubbed, an exception (failed effect) is thrown, instead of returning 404
Other
ResponseError
->ResponseException
, but type aliases are providedResponseException
is parametrised with library-specific deserialisation exception type and http-error type. What previous wasResponseError[E]
now would beResponseException[String, E]
streamBody
sets application/octet-stream as the content type by default- the default execution context used in the akka-http backend is different: instead of
global
, the EC backing the provided actor system is used - for zio backends, the
send
method has been moved fromSttpClient
to the package (for consistency with other zio libraries) - logging backends have been combined into a single one, exposing various configuration options
v2.2.9
What’s Changed
- Use scala-js-dom
File
type (#700) @guymers - Update sbt-mdoc to 2.2.9 (#697) @scala-steward
v3.0.0-RC4
This is a preview release, containing most of the functionality planned for sttp v3. The code passes all tests, however the API might change.
sttp client v3 uses a new package name (sttp.client3
) and organization (com.softwaremill.sttp.client3
). This way old and new sttp client versions can be used side-by-side. Make sure to update your imports and build dependencies!
Breaking changes since v2:
SttpBackend
trait
The trait now has 2, instead of 3 parameters. The "default" case of a backend with no additional capabilities changed:
SttpBackend[F, Nothing, NothingT] --> SttpBackend[F, Any]
The second type parameter now contains a list of supported additional capabilities. This can include:
- an implementation of
Streams
WebSockets
Finally, the type of supported streams is not given directly, but wrapped in a Streams
object. For example, the types of the AkkaHttpBackend
and AsyncHttpClientZioBackend
backends now are:
SttpBackend[Future, AkkaStreams with WebSockets]
SttpBackend[Task, ZioStreams with WebSockets]
Request
type
The type describing a request has undergone similar changes, with the last type parameter specifying the requirements that a backend must meet in order of the request to be sent. The "default" description of a request which doesn't use websockets or streams changed:
Request[T, Nothing] -> Request[T, Any]
Similarly, the type of ResponseAs
changed.
The Request.send()
method, which used an implicit SttpBackend
is deprecated. Instead, use Request.send(backend)
, giving the backend explicitly.
SttpBackendStub
- method name change:
thenRespondWrapped -> thenRespondF
- when nothing is stubbed, an exception (failed effect) is thrown, instead of returning 404
Other
ResponseError
->ResponseException
, but type aliases are providedResponseException
is parametrised with library-specific deserialisation exception type and http-error type. What previous wasResponseError[E]
now would beResponseException[String, E]
streamBody
sets application/octet-stream as the content type by default- the default execution context used in the akka-http backend is different: instead of
global
, the EC backing the provided actor system is used - for zio backends, the
send
method has been moved fromSttpClient
to the package (for consistency with other zio libraries) - logging backends have been combined into a single one, exposing various configuration options
v3.0.0-RC3
This is a preview release, containing most of the functionality planned for sttp v3. The code passes all tests, however the API might change.
Breaking changes since v2:
SttpBackend
trait
The trait now has 2, instead of 3 parameters. The "default" case of a backend with no additional capabilities changed:
SttpBackend[F, Nothing, NothingT] --> SttpBackend[F, Any]
The second type parameter now contains a list of supported additional capabilities. This can include:
- an implementation of
Streams
WebSockets
Finally, the type of supported streams is not given directly, but wrapped in a Streams
object. For example, the types of the AkkaHttpBackend
and AsyncHttpClientZioBackend
backends now are:
SttpBackend[Future, AkkaStreams with WebSockets]
SttpBackend[Task, ZioStreams with WebSockets]
Request
type
The type describing a request has undergone similar changes, with the last type parameter specifying the requirements that a backend must meet in order of the request to be sent. The "default" description of a request which doesn't use websockets or streams changed:
Request[T, Nothing] -> Request[T, Any]
Similarly, the type of ResponseAs
changed.
The Request.send()
method, which used an implicit SttpBackend
is deprecated. Instead, use Request.send(backend)
, giving the backend explicitly.
SttpBackendStub
- method name change:
thenRespondWrapped -> thenRespondF
- when nothing is stubbed, an exception (failed effect) is thrown, instead of returning 404
Other
ResponseError
->ResponseException
, but type aliases are providedResponseException
is parametrised with library-specific deserialisation exception type and http-error type. What previous wasResponseError[E]
now would beResponseException[String, E]
streamBody
sets application/octet-stream as the content type by default- the default execution context used in the akka-http backend is different: instead of
global
, the EC backing the provided actor system is used - for zio backends, the
send
method has been moved fromSttpClient
to the package (for consistency with other zio libraries) - logging backends have been combined into a single one, exposing various configuration options
v3.0.0-RC2
This is a preview release, containing most of the functionality planned for sttp v3. The code passes all tests, however the API might change.
Breaking changes since v2:
SttpBackend
trait
The trait now has 2, instead of 3 parameters. The "default" case of a backend with no additional capabilities changed:
SttpBackend[F, Nothing, NothingT] --> SttpBackend[F, Any]
The second type parameter now contains a list of supported additional capabilities. This can include:
- an implementation of
Streams
WebSockets
Finally, the type of supported streams is not given directly, but wrapped in a Streams
object. For example, the types of the AkkaHttpBackend
and AsyncHttpClientZioBackend
backends now are:
SttpBackend[Future, AkkaStreams with WebSockets]
SttpBackend[Task, ZioStreams with WebSockets]
Request
type
The type describing a request has undergone similar changes, with the last type parameter specifying the requirements that a backend must meet in order of the request to be sent. The "default" description of a request which doesn't use websockets or streams changed:
Request[T, Nothing] -> Request[T, Any]
Similarly, the type of ResponseAs
changed.
The Request.send()
method, which used an implicit SttpBackend
is deprecated. Instead, use Request.send(backend)
, giving the backend explicitly.
SttpBackendStub
- method name change:
thenRespondWrapped -> thenRespondF
- when nothing is stubbed, an exception (failed effect) is thrown, instead of returning 404
Other
ResponseError
->ResponseException
, but type aliases are providedResponseException
is parametrised with library-specific deserialisation exception type and http-error type. What previous wasResponseError[E]
now would beResponseException[String, E]
streamBody
sets application/octet-stream as the content type by default- the default execution context used in the akka-http backend is different: instead of
global
, the EC backing the provided actor system is used - for zio backends, the
send
method has been moved fromSttpClient
to the package (for consistency with other zio libraries) - logging backends have been combined into a single one, exposing various configuration options
v2.2.8
What’s Changed
- Wrap mutable httpclient builder in monad.eval, so that the request is properly constructed when the effect is re-used (#677) @adamw
- Add more ergonomic zio stubbing (#674) @paulpdaniels
- Update sbt-mdoc to 2.2.6 (#673) @scala-steward
- Lazy logging (don't construct log messages if specified log level disabled) (#671) @poslegm
v2.2.7
v3.0.0-RC1
This is a preview release, containing most of the functionality planned for sttp v3. The code passes all tests, however the API might change.
Breaking changes since v2:
SttpBackend
trait
The trait now has 2, instead of 3 parameters. The "default" case of a backend with no additional capabilities changed:
SttpBackend[F, Nothing, NothingT] --> SttpBackend[F, Any]
The second type parameter now contains a list of supported additional capabilities. This can include:
- an implementation of
Streams
WebSockets
Finally, the type of supported streams is not given directly, but wrapped in a Streams
object. For example, the types of the AkkaHttpBackend
and AsyncHttpClientZioBackend
backends now are:
SttpBackend[Future, AkkaStreams with WebSockets]
SttpBackend[Task, ZioStreams with WebSockets]
Request
type
The type describing a request has undergone similar changes, with the last type parameter specifying the requirements that a backend must meet in order of the request to be sent. The "default" description of a request which doesn't use websockets or streams changed:
Request[T, Nothing] -> Request[T, Any]
Similarly, the type of ResponseAs
changed.
The Request.send()
method, which used an implicit SttpBackend
is deprecated. Instead, use Request.send(backend)
, giving the backend explicitly.
SttpBackendStub
- method name change:
thenRespondWrapped -> thenRespondF
- when nothing is stubbed, an exception (failed effect) is thrown, instead of returning 404
Other
ResponseError
->ResponseException
, but type aliases are providedResponseException
is parametrised with library-specific deserialisation exception type and http-error type. What previous wasResponseError[E]
now would beResponseException[String, E]
streamBody
sets application/octet-stream as the content type by default- the default execution context used in the akka-http backend is different: instead of
global
, the EC backing the provided actor system is used
v2.2.6
What’s Changed
- Update zipkin-sender-okhttp3 to 2.15.1 (#663) @scala-steward
- Update monix-nio to 0.0.9 (#664) @scala-steward
- Update sbt-projectmatrix to 0.6.0 (#667) @scala-steward
- Fix handling of utf-8 responses in scala-native (#669) @sujeet
- Update finagle-http to 20.8.1 (#670) @scala-steward
- Update scalatest to 3.2.2 (#665) @scala-steward
v2.2.5
What’s Changed
- Add a ZIO-style Service type for idiomaticity points (#661) @kitlangton
- Update zio, zio-streams to 1.0.1 (#662) @scala-steward
- Update sbt-jsdependencies to 1.0.2 (#660) @scala-steward
- Update sbt-mdoc to 2.2.5 (#658) @scala-steward
- Update finagle-http to 20.8.0 (#655) @scala-steward
- Update http4s-blaze-client to 0.21.7 (#654) @scala-steward
- Update sbt-mdoc to 2.2.4 (#653) @scala-steward