Skip to content

Commit

Permalink
Setting version to 3.0.0-RC2
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Sep 10, 2020
1 parent 782590e commit b77ba69
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 61 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ sttp (v2) documentation is available at [sttp.softwaremill.com](http://sttp.soft

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.client/core_2.12/3.0.0-RC1)
scaladoc is available at [https://www.javadoc.io](https://www.javadoc.io/doc/com.softwaremill.sttp.client/core_2.12/3.0.0-RC2)

## Quickstart with Ammonite

If you are an [Ammonite](http://ammonite.io) user, you can quickly start experimenting with sttp by copy-pasting the following:

```scala
import $ivy.`com.softwaremill.sttp.client::core:3.0.0-RC1`
import $ivy.`com.softwaremill.sttp.client::core:3.0.0-RC2`
import sttp.client.quick._
quickRequest.get(uri"http://httpbin.org/ip").send(backend)
```
Expand All @@ -60,7 +60,7 @@ This brings in the sttp API and an implicit, synchronous backend.
Add the following dependency:

```scala
"com.softwaremill.sttp.client" %% "core" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "core" % "3.0.0-RC2"
```

Then, import:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/akka.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.client" %% "akka-http-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "akka-http-backend" % "3.0.0-RC2"
```

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.
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/catseffect.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The [Cats Effect](https://github.com/typelevel/cats-effect) backend is **asynchr
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "async-http-client-backend-cats" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "async-http-client-backend-cats" % "3.0.0-RC2"
```

You'll need the following imports and implicits to create the backend:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/finagle.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "finagle-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "finagle-backend" % "3.0.0-RC2"
```

Next you'll need to add an implicit value:
Expand Down
4 changes: 2 additions & 2 deletions generated-docs/out/backends/fs2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The [fs2](https://github.com/functional-streams-for-scala/fs2) backend is **asyn
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "async-http-client-backend-fs2" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "async-http-client-backend-fs2" % "3.0.0-RC2"
```

And some imports:
Expand Down Expand Up @@ -76,7 +76,7 @@ val backend = AsyncHttpClientFs2Backend.usingClient[IO](asyncHttpClient, blocker
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "httpclient-backend-fs2" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "httpclient-backend-fs2" % "3.0.0-RC2"
```

And some imports:
Expand Down
6 changes: 3 additions & 3 deletions generated-docs/out/backends/future.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Class Supported stream type
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "async-http-client-backend-future" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "async-http-client-backend-future" % "3.0.0-RC2"
```

And some imports:
Expand Down Expand Up @@ -71,7 +71,7 @@ val backend = AsyncHttpClientFutureBackend.usingClient(asyncHttpClient)
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "okhttp-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "okhttp-backend" % "3.0.0-RC2"
```

and some imports:
Expand Down Expand Up @@ -103,7 +103,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.client" %% "httpclient-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "httpclient-backend" % "3.0.0-RC2"
```

and some imports:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/http4s.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This backend is based on [http4s](https://http4s.org) (blaze client) and is **asynchronous**. To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "http4s-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "http4s-backend" % "3.0.0-RC2"
```

Add some imports as well:
Expand Down
4 changes: 2 additions & 2 deletions generated-docs/out/backends/javascript/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A JavaScript backend implemented using the [Fetch API](https://developer.mozilla
This is the default backend, available in the main jar for JS. To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %%% "core" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %%% "core" % "3.0.0-RC2"
```

And create the backend instance:
Expand Down Expand Up @@ -48,7 +48,7 @@ Streaming support is provided via `FetchMonixBackend`. Note that streaming suppo
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %%% "monix" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %%% "monix" % "3.0.0-RC2"
```

An example of streaming a response:
Expand Down
6 changes: 3 additions & 3 deletions generated-docs/out/backends/monix.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ There are several backend implementations which are `monix.eval.Task`-based. The
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "async-http-client-backend-monix" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "async-http-client-backend-monix" % "3.0.0-RC2"
```
This backend depends on [async-http-client](https://github.com/AsyncHttpClient/async-http-client), uses [Netty](http://netty.io) behind the scenes and supports effect cancellation.
Expand Down Expand Up @@ -50,7 +50,7 @@ val backend = AsyncHttpClientMonixBackend.usingClient(asyncHttpClient)
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "okhttp-backend-monix" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "okhttp-backend-monix" % "3.0.0-RC2"
```

Create the backend using:
Expand All @@ -76,7 +76,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.client" %% "httpclient-backend-monix" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "httpclient-backend-monix" % "3.0.0-RC2"
```

Create the backend using:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/native/curl.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A Scala Native backend implemented using [Curl](https://github.com/curl/curl/blo
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %%% "core" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %%% "core" % "3.0.0-RC2"
```

and initialize one of the backends:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/scalaz.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The [Scalaz](https://github.com/scalaz/scalaz) backend is **asynchronous**. Send
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "async-http-client-backend-scalaz" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "async-http-client-backend-scalaz" % "3.0.0-RC2"
```
This backend depends on [async-http-client](https://github.com/AsyncHttpClient/async-http-client) and uses [Netty](http://netty.io) behind the scenes.
Expand Down
4 changes: 2 additions & 2 deletions generated-docs/out/backends/synchronous.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This backend works with all Scala versions. A Dotty build is available as well.
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "okhttp-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "okhttp-backend" % "3.0.0-RC2"
```

Create the backend using:
Expand Down Expand Up @@ -48,7 +48,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.client" %% "httpclient-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "httpclient-backend" % "3.0.0-RC2"
```

Create the backend using:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/wrappers/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ object RateLimitingSttpBackend {
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.client" %% "core" % "3.0.0-RC1" % Test classifier "tests"
"com.softwaremill.sttp.client" %% "core" % "3.0.0-RC2" % Test classifier "tests"
```

Implement your backend and extend the `HttpTest` class:
Expand Down
49 changes: 49 additions & 0 deletions generated-docs/out/backends/wrappers/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Logging

The `sttp.client.logging.LoggingBackend` can log requests and responses which end successfully or with an exception. It can be created given:

* a `sttp.client.logging.Logger`, which is an integration point with logging libraries. Two such integration that are available with sttp-client is slf4j and scribe (see below), but custom ones can be easily added.
* a `sttp.client.logging.Log`, which constructs messages and performs logging actions. A custom implementation can be provided to change default log levels or log message content.

By default, the following options are exposed:

* `includeTiming` - should the duration of the request be included in the log message
* `beforeCurlInsteadOfShow` - before sending a request, instead of a summary of the request to be sent, log the curl command which corresponds to the request
* `logRequestBody` - should the request body be logged before sending the request (if the request body can be logged)
* `logResponseBody` - should the response body be logged after receiving a response to the request (if the response body can be replayed)

The messages are by default logged on these levels:

* `DEBUG` before the request is sent
* `DEBUG` when a request completes successfully
* `ERROR` when there's an exception when sending a request

## Using slf4j

To use the [slf4j](http://www.slf4j.org) logging backend wrapper, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "slf4j-backend" % "3.0.0-RC2"
```

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.0/log4j-slf4j-impl/index.html).

Example usage:

```scala
import sttp.client._
import sttp.client.logging.slf4j.Slf4jLoggingBackend

val backend = Slf4jLoggingBackend(HttpURLConnectionBackend())
basicRequest.get(uri"https://httpbin.org/get").send(backend)
```

To create a customised logging backend, see the section on [custom backends](custom.md).

## Using scribe

To use the [scribe](https://github.com/outr/scribe) logging backend wrapper, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "scribe-backend" % "3.0.0-RC2"
```
4 changes: 2 additions & 2 deletions generated-docs/out/backends/wrappers/opentracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "opentracing-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "opentracing-backend" % "3.0.0-RC2"
```

This backend depends on [opentracing](https://github.com/opentracing/opentracing-java), a standardized set of api for distributed tracing.
Expand Down Expand Up @@ -47,7 +47,7 @@ Using with [jaeger](https://www.jaegertracing.io/) tracing
Add following dependency:

```
libraryDependencies += "io.jaegertracing" % "jaeger-client" % "1.3.2"
libraryDependencies += "io.jaegertracing" % "jaeger-client" % "1.4.0"
```

Create an instance of tracer:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/wrappers/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "prometheus-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "prometheus-backend" % "3.0.0-RC2"
```

and some imports:
Expand Down
2 changes: 1 addition & 1 deletion generated-docs/out/backends/wrappers/zio-opentracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "zio-telemetry-opentracing-backend" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "zio-telemetry-opentracing-backend" % "3.0.0-RC2"
```

This backend depends on [zio-opentracing](https://github.com/zio/zio-telemetry).
Expand Down
4 changes: 2 additions & 2 deletions generated-docs/out/backends/zio.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The [ZIO](https://github.com/zio/zio) backends are **asynchronous**. Sending a r
To use, add the following dependency to your project:

```scala
"com.softwaremill.sttp.client" %% "async-http-client-backend-zio" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "async-http-client-backend-zio" % "3.0.0-RC2"
```
This backend depends on [async-http-client](https://github.com/AsyncHttpClient/async-http-client), uses [Netty](http://netty.io) behind the scenes and supports effect cancellation. This backend works with all Scala versions. A Dotty build is available as well.
Expand Down Expand Up @@ -53,7 +53,7 @@ val backend = AsyncHttpClientZioBackend.usingClient(runtime, asyncHttpClient)
To use, add the following dependency to your project:

```
"com.softwaremill.sttp.client" %% "httpclient-backend-zio" % "3.0.0-RC1"
"com.softwaremill.sttp.client" %% "httpclient-backend-zio" % "3.0.0-RC2"
```

Create the backend using:
Expand Down
Loading

0 comments on commit b77ba69

Please sign in to comment.