Skip to content

Commit

Permalink
Merge pull request #107 from hmemcpy/sttp3-upgrade
Browse files Browse the repository at this point in the history
Upgrading the sttp client to sttp3
  • Loading branch information
zalbia authored Oct 21, 2021
2 parents 3cc0629 + 09004c3 commit 339e768
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
16 changes: 8 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ val zioHttpVersion = "1.0.0.0-RC17"
val zioJson = "0.1.5"
val zioMagicVersion = "0.3.8"
val zioPreludeVersion = "1.0.0-RC7"
val sttpVersion = "2.2.9"
val sttpVersion = "3.3.15"

lazy val root =
project
Expand All @@ -49,13 +49,13 @@ lazy val zioWebhooks = module("zio-webhooks", "webhooks")
.settings(buildInfoSettings("zio.webhooks"))
.settings(
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-json" % zioJson,
"dev.zio" %% "zio-prelude" % zioPreludeVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion,
"com.softwaremill.sttp.client" %% "core" % sttpVersion,
"com.softwaremill.sttp.client" %% "async-http-client-backend-zio" % sttpVersion
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-json" % zioJson,
"dev.zio" %% "zio-prelude" % zioPreludeVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion,
"com.softwaremill.sttp.client3" %% "core" % sttpVersion,
"com.softwaremill.sttp.client3" %% "async-http-client-backend-zio" % sttpVersion
)
)
.settings(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package zio.webhooks.backends.sttp

import _root_.sttp.client.asynchttpclient.zio.AsyncHttpClientZioBackend
import _root_.sttp.client._
import _root_.sttp.client3.asynchttpclient.zio.{ AsyncHttpClientZioBackend, SttpClient }
import _root_.sttp.client3._
import sttp.model.Uri
import zio._
import zio.webhooks.WebhookError.BadWebhookUrlError
Expand All @@ -14,7 +14,7 @@ import java.io.IOException
* A [[WebhookSttpClient]] provides a [[WebhookHttpClient]] using sttp's ZIO backend, i.e.
* `AsyncHttpClientZioBackend`.
*/
final case class WebhookSttpClient(sttpClient: SttpClient, permits: Semaphore) extends WebhookHttpClient {
final case class WebhookSttpClient(sttpClient: SttpClient.Service, permits: Semaphore) extends WebhookHttpClient {

def post(webhookRequest: WebhookHttpRequest): IO[HttpPostError, WebhookHttpResponse] =
permits.withPermit {
Expand Down
16 changes: 0 additions & 16 deletions webhooks/src/main/scala/zio/webhooks/backends/sttp/package.scala

This file was deleted.

0 comments on commit 339e768

Please sign in to comment.