From 370d64969372eead1096e673c342681d298e3c2a Mon Sep 17 00:00:00 2001 From: adamw Date: Tue, 14 Jan 2025 12:01:48 +0100 Subject: [PATCH] Release 4.0.0-M24 --- README.md | 14 +++++----- generated-docs/out/backends/akka.md | 2 +- generated-docs/out/backends/catseffect.md | 6 ++--- generated-docs/out/backends/finagle.md | 2 +- generated-docs/out/backends/fs2.md | 8 +++--- generated-docs/out/backends/future.md | 6 ++--- generated-docs/out/backends/http4s.md | 4 +-- .../out/backends/javascript/fetch.md | 12 ++++----- generated-docs/out/backends/monix.md | 6 ++--- generated-docs/out/backends/native/curl.md | 4 +-- generated-docs/out/backends/pekko.md | 2 +- generated-docs/out/backends/scalaz.md | 2 +- generated-docs/out/backends/synchronous.md | 8 +++--- generated-docs/out/backends/wrappers/cache.md | 2 +- .../out/backends/wrappers/custom.md | 6 ++--- .../out/backends/wrappers/logging.md | 4 +-- .../out/backends/wrappers/opentelemetry.md | 4 +-- .../out/backends/wrappers/prometheus.md | 2 +- generated-docs/out/backends/zio.md | 8 +++--- generated-docs/out/includes/examples_list.md | 3 +++ generated-docs/out/index.md | 6 ++--- generated-docs/out/other/json.md | 26 +++++++++---------- generated-docs/out/other/openapi.md | 8 +++--- generated-docs/out/other/websockets.md | 2 +- generated-docs/out/quickstart.md | 14 +++++----- 25 files changed, 82 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index e1169633c..e40a72053 100755 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The library is available for Scala 2.12, 2.13 and 3. Supported platforms are the Here's a quick example of sttp client in action, runnable using [scala-cli](https://scala-cli.virtuslab.org): ```scala -//> using dep com.softwaremill.sttp.client4::core:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core:4.0.0-M24 import sttp.client4.quick.* @@ -37,7 +37,7 @@ Additionally, sttp client seamlessly integrates with popular libraries for JSON Some more features: URI interpolation, a self-managed backend, and type-safe HTTP error/success representation, are demonstrated by the below example: ```scala -//> using dep com.softwaremill.sttp.client4::core:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core:4.0.0-M24 import sttp.client4.* @@ -72,7 +72,7 @@ sttp (v2) documentation is available at [sttp.softwaremill.com/en/v2](https://st sttp (v1) documentation is available at [sttp.softwaremill.com/en/v1](https://sttp.softwaremill.com/en/v1). -scaladoc is available at [https://www.javadoc.io](https://www.javadoc.io/doc/com.softwaremill.sttp.client4/core_2.12/4.0.0-M23) +scaladoc is available at [https://www.javadoc.io](https://www.javadoc.io/doc/com.softwaremill.sttp.client4/core_2.12/4.0.0-M24) ## Quickstart with scala-cli @@ -80,7 +80,7 @@ Add the following directive to the top of your scala file to add the core sttp d If you are using [scala-cli](https://scala-cli.virtuslab.org), you can quickly start experimenting with sttp by copy-pasting the following: ``` -//> using dep "com.softwaremill.sttp.client4::core:4.0.0-M23" +//> using dep "com.softwaremill.sttp.client4::core:4.0.0-M24" import sttp.client4.quick.* quickRequest.get(uri"http://httpbin.org/ip").send() ``` @@ -92,7 +92,7 @@ The `quick` package import brings in the sttp API and a pre-configured, global s Similarly, using [Ammonite](http://ammonite.io): ```scala -import $ivy.`com.softwaremill.sttp.client4::core:4.0.0-M23` +import $ivy.`com.softwaremill.sttp.client4::core:4.0.0-M24` import sttp.client4.quick.* quickRequest.get(uri"http://httpbin.org/ip").send() ``` @@ -102,7 +102,7 @@ quickRequest.get(uri"http://httpbin.org/ip").send() Add the following dependency: ```scala -"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24" ``` Then, import: @@ -160,7 +160,7 @@ The documentation is typechecked using [mdoc](https://scalameta.org/mdoc/). The When generating documentation, it's best to set the version to the current one, so that the generated doc files don't include modifications with the current snapshot version. -That is, in sbt run: `set ThisBuild/version := "4.0.0-M23"`, before running `mdoc` in `docs`. +That is, in sbt run: `set ThisBuild/version := "4.0.0-M24"`, before running `mdoc` in `docs`. ### Testing the Scala.JS backend diff --git a/generated-docs/out/backends/akka.md b/generated-docs/out/backends/akka.md index 0d01d7d4e..de610b406 100644 --- a/generated-docs/out/backends/akka.md +++ b/generated-docs/out/backends/akka.md @@ -3,7 +3,7 @@ This backend is based on [akka-http](http://doc.akka.io/docs/akka-http/current/scala/http/). To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "akka-http-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "akka-http-backend" % "4.0.0-M24" ``` A fully **asynchronous** backend. Uses the `Future` effect to return responses. There are also [other `Future`-based backends](future.md), which don't depend on Akka. diff --git a/generated-docs/out/backends/catseffect.md b/generated-docs/out/backends/catseffect.md index 94f64566c..e961b4339 100644 --- a/generated-docs/out/backends/catseffect.md +++ b/generated-docs/out/backends/catseffect.md @@ -14,7 +14,7 @@ Also note that the [http4s](http4s.md) backend can also be created for a type im Firstly, add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "cats" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "cats" % "4.0.0-M24" ``` Obtain a cats-effect `Resource` which creates the backend, and closes the thread pool after the resource is no longer used: @@ -83,9 +83,9 @@ Firstly, add the following dependency to your project: ```scala // for cats-effect 3.x -"com.softwaremill.sttp.client4" %% "armeria-backend-cats" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend-cats" % "4.0.0-M24" // or for cats-effect 2.x -"com.softwaremill.sttp.client4" %% "armeria-backend-cats-ce2" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend-cats-ce2" % "4.0.0-M24" ``` create client: diff --git a/generated-docs/out/backends/finagle.md b/generated-docs/out/backends/finagle.md index 65fc12838..294c0ba2a 100644 --- a/generated-docs/out/backends/finagle.md +++ b/generated-docs/out/backends/finagle.md @@ -3,7 +3,7 @@ To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "finagle-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "finagle-backend" % "4.0.0-M24" ``` Next you'll need to add an implicit value: diff --git a/generated-docs/out/backends/fs2.md b/generated-docs/out/backends/fs2.md index e0b220a9f..ccc26ab39 100644 --- a/generated-docs/out/backends/fs2.md +++ b/generated-docs/out/backends/fs2.md @@ -12,9 +12,9 @@ Creation of the backend can be done in two basic ways: Firstly, add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "fs2" % "4.0.0-M23" // for cats-effect 3.x & fs2 3.x +"com.softwaremill.sttp.client4" %% "fs2" % "4.0.0-M24" // for cats-effect 3.x & fs2 3.x // or -"com.softwaremill.sttp.client4" %% "fs2ce2" % "4.0.0-M23" // for cats-effect 2.x & fs2 2.x +"com.softwaremill.sttp.client4" %% "fs2ce2" % "4.0.0-M24" // for cats-effect 2.x & fs2 2.x ``` Obtain a cats-effect `Resource` which creates the backend, and closes the thread pool after the resource is no longer used: @@ -78,9 +78,9 @@ To use, add the following dependency to your project: ```scala // for cats-effect 3.x & fs2 3.x -"com.softwaremill.sttp.client4" %% "armeria-backend-fs2" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend-fs2" % "4.0.0-M24" // or for cats-effect 2.x & fs2 2.x -"com.softwaremill.sttp.client4" %% "armeria-backend-fs2" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend-fs2" % "4.0.0-M24" ``` create client: diff --git a/generated-docs/out/backends/future.md b/generated-docs/out/backends/future.md index 326068d05..a800067a3 100644 --- a/generated-docs/out/backends/future.md +++ b/generated-docs/out/backends/future.md @@ -21,7 +21,7 @@ Class Supported stream type To use, you don't need any extra dependencies, `core` is enough: ``` -"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24" ``` You'll need the following imports: @@ -59,7 +59,7 @@ Host header override is supported in environments running Java 12 onwards, but i To use, add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "okhttp-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "okhttp-backend" % "4.0.0-M24" ``` and some imports: @@ -91,7 +91,7 @@ This backend depends on [OkHttp](http://square.github.io/okhttp/) and fully supp To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "armeria-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend" % "4.0.0-M24" ``` add imports: diff --git a/generated-docs/out/backends/http4s.md b/generated-docs/out/backends/http4s.md index 15747074d..44320486e 100644 --- a/generated-docs/out/backends/http4s.md +++ b/generated-docs/out/backends/http4s.md @@ -4,9 +4,9 @@ This backend is based on [http4s](https://http4s.org) (client) and is **asynchro ```scala // for cats-effect 3.x & http4s 1.0.0-Mx -"com.softwaremill.sttp.client4" %% "http4s-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "http4s-backend" % "4.0.0-M24" // or for cats-effect 2.x & http4s 0.21.x -"com.softwaremill.sttp.client4" %% "http4s-ce2-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "http4s-ce2-backend" % "4.0.0-M24" ``` The backend can be created in a couple of ways, e.g.: diff --git a/generated-docs/out/backends/javascript/fetch.md b/generated-docs/out/backends/javascript/fetch.md index d7e90ccde..2d53e8de4 100644 --- a/generated-docs/out/backends/javascript/fetch.md +++ b/generated-docs/out/backends/javascript/fetch.md @@ -7,7 +7,7 @@ A JavaScript backend with web socket support. Implemented using the [Fetch API]( This is the default backend, available in the main jar for JS. To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %%% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "core" % "4.0.0-M24" ``` And create the backend instance: @@ -26,7 +26,7 @@ Note that `Fetch` does not pass cookies by default. If your request needs cookie To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %%% "monix" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "monix" % "4.0.0-M24" ``` And create the backend instance: @@ -40,7 +40,7 @@ val backend = FetchMonixBackend() To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %%% "zio" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "zio" % "4.0.0-M24" ``` And create the backend instance: @@ -55,13 +55,13 @@ Any effect implementing the cats-effect `Concurrent` typeclass can be used. To u your project: ``` -"com.softwaremill.sttp.client4" %%% "cats" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "cats" % "4.0.0-M24" ``` If you are on Cats Effect 2 (CE2) you will need to add the CE2 specific dependency instead: ``` -"com.softwaremill.sttp.client4" %%% "catsce2" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "catsce2" % "4.0.0-M24" ``` And create the backend instance: @@ -129,7 +129,7 @@ Streaming support is provided via `FetchMonixBackend`. Note that streaming suppo To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %%% "monix" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "monix" % "4.0.0-M24" ``` An example of streaming a response: diff --git a/generated-docs/out/backends/monix.md b/generated-docs/out/backends/monix.md index 7eb6489b7..d9220c3ef 100644 --- a/generated-docs/out/backends/monix.md +++ b/generated-docs/out/backends/monix.md @@ -12,7 +12,7 @@ Creation of the backend can be done in two basic ways: Firstly, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "monix" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "monix" % "4.0.0-M24" ``` and create the backend using: @@ -49,7 +49,7 @@ Host header override is supported in environments running Java 12 onwards, but i To use, add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "okhttp-backend-monix" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "okhttp-backend-monix" % "4.0.0-M24" ``` Create the backend using: @@ -75,7 +75,7 @@ This backend depends on [OkHttp](http://square.github.io/okhttp/) and fully supp To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "armeria-backend-monix" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend-monix" % "4.0.0-M24" ``` add imports: diff --git a/generated-docs/out/backends/native/curl.md b/generated-docs/out/backends/native/curl.md index cd53598ab..37a11aee2 100644 --- a/generated-docs/out/backends/native/curl.md +++ b/generated-docs/out/backends/native/curl.md @@ -5,7 +5,7 @@ A Scala Native (0.5.x) backend implemented using [Curl](https://github.com/curl/ To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %%% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "core" % "4.0.0-M24" ``` and initialize one of the backends: @@ -28,7 +28,7 @@ Try the following example: // hello.scala //> using platform native -//> using dep com.softwaremill.sttp.client4::core_native0.5:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core_native0.5:4.0.0-M24 import sttp.client4.* import sttp.client4.curl.CurlBackend diff --git a/generated-docs/out/backends/pekko.md b/generated-docs/out/backends/pekko.md index 6d649f357..8d11a6728 100644 --- a/generated-docs/out/backends/pekko.md +++ b/generated-docs/out/backends/pekko.md @@ -3,7 +3,7 @@ This backend is based on [pekko-http](https://pekko.apache.org/docs/pekko-http/current/). To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "pekko-http-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "pekko-http-backend" % "4.0.0-M24" ``` A fully **asynchronous** backend. Uses the `Future` effect to return responses. There are also [other `Future`-based backends](future.md), which don't depend on Pekko. diff --git a/generated-docs/out/backends/scalaz.md b/generated-docs/out/backends/scalaz.md index d253f0a3b..83563dbdf 100644 --- a/generated-docs/out/backends/scalaz.md +++ b/generated-docs/out/backends/scalaz.md @@ -8,7 +8,7 @@ The [Scalaz](https://github.com/scalaz/scalaz) backend is **asynchronous**. Send To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "armeria-backend-scalaz" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "armeria-backend-scalaz" % "4.0.0-M24" ``` add imports: diff --git a/generated-docs/out/backends/synchronous.md b/generated-docs/out/backends/synchronous.md index e3d594a7d..63cc4d4e5 100644 --- a/generated-docs/out/backends/synchronous.md +++ b/generated-docs/out/backends/synchronous.md @@ -7,7 +7,7 @@ There are several synchronous backend implementations. Sending a request using t The default **synchronous** backend. To use, you don't need any extra dependencies, `core` is enough: ``` -"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24" ``` Create the backend using: @@ -40,7 +40,7 @@ Host header override is supported in environments running Java 12 onwards, but i To use, you don't need any extra dependencies, `core` is enough: ``` -"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24" ``` Create the backend using: @@ -62,7 +62,7 @@ This backend supports host header override, but it has to be enabled by system p To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "okhttp-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "okhttp-backend" % "4.0.0-M24" ``` Create the backend using: @@ -99,7 +99,7 @@ Both HttpClient and OkHttp backends support regular [websockets](../other/websoc ``` // sbt dependency -"com.softwaremill.sttp.client4" %% "ox" % "4.0.0-M23", +"com.softwaremill.sttp.client4" %% "ox" % "4.0.0-M24", ``` ```scala diff --git a/generated-docs/out/backends/wrappers/cache.md b/generated-docs/out/backends/wrappers/cache.md index 348e87ed9..2edc090fc 100644 --- a/generated-docs/out/backends/wrappers/cache.md +++ b/generated-docs/out/backends/wrappers/cache.md @@ -3,7 +3,7 @@ To use the caching backend, add the following dependency: ``` -"com.softwaremill.sttp.client4" %% "caching-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "caching-backend" % "4.0.0-M24" ``` The backend caches responses to eligible requests, and returns them from the cache if a repeated request is made. A prerequisite for a request to be considered for caching is that its response-as description is "cache-friendly"; this excludes non-blocking streaming responses, file-based responses and WebSockets. diff --git a/generated-docs/out/backends/wrappers/custom.md b/generated-docs/out/backends/wrappers/custom.md index b79d01505..e8b2bf212 100644 --- a/generated-docs/out/backends/wrappers/custom.md +++ b/generated-docs/out/backends/wrappers/custom.md @@ -45,7 +45,7 @@ A number of example backend wrappers can be found in [examples](../../examples.m Implementing a new backend is made easy as the tests are published in the `core` jar file under the `tests` classifier. Simply add the follow dependencies to your `build.sbt`: ``` -"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23" % Test classifier "tests" +"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24" % Test classifier "tests" ``` Implement your backend and extend the `HttpTest` class: @@ -72,9 +72,9 @@ import sttp.client4.impl.cats.implicits.* from the cats integration module. The module should be available on the classpath after adding following dependency: ```scala -"com.softwaremill.sttp.client4" %% "cats" % "4.0.0-M23" // for cats-effect 3.x +"com.softwaremill.sttp.client4" %% "cats" % "4.0.0-M24" // for cats-effect 3.x // or -"com.softwaremill.sttp.client4" %% "catsce2" % "4.0.0-M23" // for cats-effect 2.x +"com.softwaremill.sttp.client4" %% "catsce2" % "4.0.0-M24" // for cats-effect 2.x ``` The object contains implicits to convert a cats `MonadError` into the sttp `MonadError`, diff --git a/generated-docs/out/backends/wrappers/logging.md b/generated-docs/out/backends/wrappers/logging.md index 6e84ebba1..b8ec93e52 100644 --- a/generated-docs/out/backends/wrappers/logging.md +++ b/generated-docs/out/backends/wrappers/logging.md @@ -28,7 +28,7 @@ Log levels can be configured when creating the `LoggingBackend`, or specified in To use the [slf4j](http://www.slf4j.org) logging backend wrapper, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "slf4j-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "slf4j-backend" % "4.0.0-M24" ``` There are three backend wrappers available, which log request & response information using a slf4j `Logger`. To see the logs, you'll need to use an slf4j-compatible logger implementation, e.g. [logback](http://logback.qos.ch), or use a binding, e.g. [log4j-slf4j](https://logging.apache.org/log4j/2.x/log4j-slf4j-impl.html). @@ -53,5 +53,5 @@ To create a customised logging backend, see the section on [custom backends](cus To use the [scribe](https://github.com/outr/scribe) logging backend wrapper, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "scribe-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "scribe-backend" % "4.0.0-M24" ``` \ No newline at end of file diff --git a/generated-docs/out/backends/wrappers/opentelemetry.md b/generated-docs/out/backends/wrappers/opentelemetry.md index ad8a5aae3..0287f9137 100644 --- a/generated-docs/out/backends/wrappers/opentelemetry.md +++ b/generated-docs/out/backends/wrappers/opentelemetry.md @@ -12,7 +12,7 @@ The backend depends only on [opentelemetry-api](https://github.com/open-telemetr following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "opentelemetry-metrics-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "opentelemetry-metrics-backend" % "4.0.0-M24" ``` Then an instance can be obtained as follows: @@ -55,7 +55,7 @@ OpenTelemetryMetricsBackend( To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "opentelemetry-tracing-zio-backend" % "4.0.0-M23" // for ZIO 2.x +"com.softwaremill.sttp.client4" %% "opentelemetry-tracing-zio-backend" % "4.0.0-M24" // for ZIO 2.x ``` This backend depends on [zio-opentelemetry](https://github.com/zio/zio-telemetry). diff --git a/generated-docs/out/backends/wrappers/prometheus.md b/generated-docs/out/backends/wrappers/prometheus.md index 1a95cb587..ab8f8032b 100644 --- a/generated-docs/out/backends/wrappers/prometheus.md +++ b/generated-docs/out/backends/wrappers/prometheus.md @@ -3,7 +3,7 @@ To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "prometheus-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "prometheus-backend" % "4.0.0-M24" ``` and some imports: diff --git a/generated-docs/out/backends/zio.md b/generated-docs/out/backends/zio.md index 63469b06b..ac2a5c600 100644 --- a/generated-docs/out/backends/zio.md +++ b/generated-docs/out/backends/zio.md @@ -9,8 +9,8 @@ The `*-zio` modules depend on ZIO 2.x. For ZIO 1.x support, use modules with the To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "zio" % "4.0.0-M23" // for ZIO 2.x -"com.softwaremill.sttp.client4" %% "zio1" % "4.0.0-M23" // for ZIO 1.x +"com.softwaremill.sttp.client4" %% "zio" % "4.0.0-M24" // for ZIO 2.x +"com.softwaremill.sttp.client4" %% "zio1" % "4.0.0-M24" // for ZIO 1.x ``` Create the backend using: @@ -45,8 +45,8 @@ Host header override is supported in environments running Java 12 onwards, but i To use, add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "armeria-backend-zio" % "4.0.0-M23" // for ZIO 2.x -"com.softwaremill.sttp.client4" %% "armeria-backend-zio1" % "4.0.0-M23" // for ZIO 1.x +"com.softwaremill.sttp.client4" %% "armeria-backend-zio" % "4.0.0-M24" // for ZIO 2.x +"com.softwaremill.sttp.client4" %% "armeria-backend-zio1" % "4.0.0-M24" // for ZIO 1.x ``` add imports: diff --git a/generated-docs/out/includes/examples_list.md b/generated-docs/out/includes/examples_list.md index a8a886239..b1248aa67 100644 --- a/generated-docs/out/includes/examples_list.md +++ b/generated-docs/out/includes/examples_list.md @@ -29,6 +29,9 @@ ## Other +* [Command output streaming with os-lib support](https://github.com/softwaremill/sttp/tree/master/examples/src/main/scala/sttp/client4/examples/cmdOutputStreamingWithOsLib.scala) HttpClient Direct +* [Download file with os-lib support](https://github.com/softwaremill/sttp/tree/master/examples/src/main/scala/sttp/client4/examples/uploadFileWithOsLib.scala) HttpClient Direct +* [Download file with os-lib support](https://github.com/softwaremill/sttp/tree/master/examples/src/main/scala/sttp/client4/examples/downloadFileWitOsLib.scala) HttpClient Direct * [Handle the body by both parsing it to JSON and returning the raw string](https://github.com/softwaremill/sttp/tree/master/examples/src/main/scala/sttp/client4/examples/GetRawResponseBodySynchronous.scala) HttpClient Direct ## Resilience diff --git a/generated-docs/out/index.md b/generated-docs/out/index.md index 8bb75eb59..28cbc345e 100644 --- a/generated-docs/out/index.md +++ b/generated-docs/out/index.md @@ -11,7 +11,7 @@ The library is available for Scala 2.12, 2.13 and 3. Supported platforms are the Here's a quick example of sttp client in action, runnable using [scala-cli](https://scala-cli.virtuslab.org): ```scala -//> using dep com.softwaremill.sttp.client4::core:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core:4.0.0-M24 import sttp.client4.quick.* @@ -30,7 +30,7 @@ Additionally, sttp client seamlessly integrates with popular libraries for JSON Some more features: URI interpolation, a self-managed backend, and type-safe HTTP error/success representation, are demonstrated by the below example: ```scala -//> using dep com.softwaremill.sttp.client4::core:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core:4.0.0-M24 import sttp.client4.* @@ -55,7 +55,7 @@ import sttp.client4.* But that's just a small glimpse of sttp client's features! For more examples, see the [usage examples](examples.md) section. -To start using sttp client in your project, see the [quickstart](quickstart.md). Or, browse the documentation to find the topics that interest you the most! ScalaDoc is available at [https://www.javadoc.io](https://www.javadoc.io/doc/com.softwaremill.sttp.client4/core_2.12/4.0.0-M23). +To start using sttp client in your project, see the [quickstart](quickstart.md). Or, browse the documentation to find the topics that interest you the most! ScalaDoc is available at [https://www.javadoc.io](https://www.javadoc.io/doc/com.softwaremill.sttp.client4/core_2.12/4.0.0-M24). sttp client is licensed under Apache2, the source code is [available on GitHub](https://github.com/softwaremill/sttp). diff --git a/generated-docs/out/other/json.md b/generated-docs/out/other/json.md index e1697fee0..8e6931d62 100644 --- a/generated-docs/out/other/json.md +++ b/generated-docs/out/other/json.md @@ -44,7 +44,7 @@ case class ResponsePayload(data: String) JSON encoding of bodies and decoding of responses can be handled using [Circe](https://circe.github.io/circe/) by the `circe` module. To use add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "circe" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "circe" % "4.0.0-M24" ``` This module adds a body serialized, so that json payloads can be sent as request bodies. To send a payload of type `T` as json, a `io.circe.Encoder[T]` implicit value must be available in scope. @@ -76,7 +76,7 @@ Arbitrary JSON structures can be traversed by parsing the result as `io.circe.Js To encode and decode json using json4s, add the following dependencies to your project: ``` -"com.softwaremill.sttp.client4" %% "json4s" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "json4s" % "4.0.0-M24" "org.json4s" %% "json4s-native" % "3.6.0" ``` @@ -112,7 +112,7 @@ val response: Response[Either[ResponseException[String], ResponsePayload]] = To encode and decode JSON using [spray-json](https://github.com/spray/spray-json), add the following dependency to your project: ``` -"com.softwaremill.sttp.client4" %% "spray-json" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "spray-json" % "4.0.0-M24" ``` Using this module it is possible to set request bodies and read response bodies as your custom types, using the implicitly available instances of `spray.json.JsonWriter` / `spray.json.JsonReader` or `spray.json.JsonFormat`. @@ -144,13 +144,13 @@ val response: Response[Either[ResponseException[String], ResponsePayload]] = To encode and decode JSON using [play-json](https://www.playframework.com), add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "play-json" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "play-json" % "4.0.0-M24" ``` If you use older version of play (2.9.x), add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "play29-json" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "play29-json" % "4.0.0-M24" ``` To use, add an import: `import sttp.client4.playJson._`. @@ -162,13 +162,13 @@ To encode and decode JSON using the high-performance [zio-json](https://zio.gith The `zio-json` module depends on ZIO 2.x. For ZIO 1.x support, use `zio1-json`. ```scala -"com.softwaremill.sttp.client4" %% "zio-json" % "4.0.0-M23" // for ZIO 2.x -"com.softwaremill.sttp.client4" %% "zio1-json" % "4.0.0-M23" // for ZIO 1.x +"com.softwaremill.sttp.client4" %% "zio-json" % "4.0.0-M24" // for ZIO 2.x +"com.softwaremill.sttp.client4" %% "zio1-json" % "4.0.0-M24" // for ZIO 1.x ``` or for ScalaJS (cross build) projects: ```scala -"com.softwaremill.sttp.client4" %%% "zio-json" % "4.0.0-M23" // for ZIO 2.x -"com.softwaremill.sttp.client4" %%% "zio1-json" % "4.0.0-M23" // for ZIO 1.x +"com.softwaremill.sttp.client4" %%% "zio-json" % "4.0.0-M24" // for ZIO 2.x +"com.softwaremill.sttp.client4" %%% "zio1-json" % "4.0.0-M24" // for ZIO 1.x ``` To use, add an import: `import sttp.client4.ziojson._` (or extend `SttpZioJsonApi`), define an implicit `JsonCodec`, or `JsonDecoder`/`JsonEncoder` for your datatype. @@ -200,13 +200,13 @@ basicRequest To encode and decode JSON using the [high(est)-performant](https://plokhotnyuk.github.io/jsoniter-scala/) [jsoniter-scala](https://github.com/plokhotnyuk/jsoniter-scala) library, one add the following dependency to your project. ```scala -"com.softwaremill.sttp.client4" %% "jsoniter" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "jsoniter" % "4.0.0-M24" ``` or for ScalaJS (cross build) projects: ```scala -"com.softwaremill.sttp.client4" %%% "jsoniter" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "jsoniter" % "4.0.0-M24" ``` To use, add an import: `import sttp.client4.jsoniter._` (or extend `SttpJsonIterJsonApi`), define an implicit `JsonCodec`, or `JsonDecoder`/`JsonEncoder` for your datatype. @@ -240,13 +240,13 @@ basicRequest To encode and decode JSON using the [uPickle](https://github.com/com-lihaoyi/upickle) library, add the following dependency to your project: ```scala -"com.softwaremill.sttp.client4" %% "upickle" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "upickle" % "4.0.0-M24" ``` or for ScalaJS (cross build) projects: ```scala -"com.softwaremill.sttp.client4" %%% "upickle" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %%% "upickle" % "4.0.0-M24" ``` To use, add an import: `import sttp.client4.upicklejson.default._` and define an implicit `ReadWriter` (or separately `Reader` and `Writer`) for your datatype. diff --git a/generated-docs/out/other/openapi.md b/generated-docs/out/other/openapi.md index 6502032d9..8b34507c8 100644 --- a/generated-docs/out/other/openapi.md +++ b/generated-docs/out/other/openapi.md @@ -43,8 +43,8 @@ lazy val petstoreApi: Project = project openApiGeneratorName := "scala-sttp", openApiOutputDir := baseDirectory.value.name, libraryDependencies ++= Seq( - "com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23", - "com.softwaremill.sttp.client4" %% "json4s" % "4.0.0-M23", + "com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24", + "com.softwaremill.sttp.client4" %% "json4s" % "4.0.0-M24", "org.json4s" %% "json4s-jackson" % "3.6.8" ) ) @@ -94,8 +94,8 @@ lazy val petstoreApi: Project = project openApiOutputDir := baseDirectory.value.name, openApiIgnoreFileOverride := s"${baseDirectory.in(ThisBuild).value.getPath}/openapi-ignore-file", libraryDependencies ++= Seq( - "com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23", - "com.softwaremill.sttp.client4" %% "json4s" % "4.0.0-M23", + "com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24", + "com.softwaremill.sttp.client4" %% "json4s" % "4.0.0-M24", "org.json4s" %% "json4s-jackson" % "3.6.8" ), (compile in Compile) := ((compile in Compile) dependsOn openApiGenerate).value, diff --git a/generated-docs/out/other/websockets.md b/generated-docs/out/other/websockets.md index 0ec04e10f..42b43cf3a 100644 --- a/generated-docs/out/other/websockets.md +++ b/generated-docs/out/other/websockets.md @@ -102,7 +102,7 @@ as Ox `Source` and `Sink`: ``` // sbt dependency -"com.softwaremill.sttp.client4" %% "ox" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "ox" % "4.0.0-M24" ``` ```scala diff --git a/generated-docs/out/quickstart.md b/generated-docs/out/quickstart.md index 8d2fd43e9..46c2b2666 100644 --- a/generated-docs/out/quickstart.md +++ b/generated-docs/out/quickstart.md @@ -12,7 +12,7 @@ sttp client is available for Scala 2.12, 2.13 and 3, on the JVM (Java 11+), Scal The basic dependency which provides the API, together with a synchronous and `Future`-based backends, is: ```scala -"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "core" % "4.0.0-M24" ``` ## Using scala-cli @@ -20,7 +20,7 @@ The basic dependency which provides the API, together with a synchronous and `Fu Add the following directive to the top of your scala file to add the core sttp dependency: ``` -//> using dep com.softwaremill.sttp.client4::core:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core:4.0.0-M24 ``` ## Using Ammonite @@ -28,7 +28,7 @@ Add the following directive to the top of your scala file to add the core sttp d If you are an [Ammonite](https://ammonite.io) user, you can quickly start experimenting with sttp by copy-pasting the following: ```scala -import $ivy.`com.softwaremill.sttp.client4::core:4.0.0-M23` +import $ivy.`com.softwaremill.sttp.client4::core:4.0.0-M24` ``` ## Imports @@ -69,14 +69,14 @@ As an example, to integrate with the [uPickle](https://github.com/com-lihaoyi/up dependency: ```scala -"com.softwaremill.sttp.client4" %% "upickle" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "upickle" % "4.0.0-M24" ``` Your code might then look as follows: ```scala -//> using dep com.softwaremill.sttp.client4::core:4.0.0-M23 -//> using dep com.softwaremill.sttp.client4::upickle:4.0.0-M23 +//> using dep com.softwaremill.sttp.client4::core:4.0.0-M24 +//> using dep com.softwaremill.sttp.client4::upickle:4.0.0-M24 import sttp.client4.* import sttp.client4.upicklejson.default.* @@ -110,7 +110,7 @@ Logging can be added using the [logging backend wrapper](backends/wrappers/loggi use slf4j, you'll need the following dependency: ``` -"com.softwaremill.sttp.client4" %% "slf4j-backend" % "4.0.0-M23" +"com.softwaremill.sttp.client4" %% "slf4j-backend" % "4.0.0-M24" ``` Then, you'll need to configure your client: