Skip to content

Commit

Permalink
Replace deprecated AsyncHttpClientFutureBackend (#3148)
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippus committed Sep 16, 2024
1 parent 17c3586 commit e2395f4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ lazy val clientsttp = (project in file("elastic4s-client-sttp"))
.dependsOn(core, testkit % "test")
.settings(name := "elastic4s-client-sttp")
.settings(scala3Settings)
.settings(libraryDependencies ++= Seq(sttp, asyncHttpClientBackendFuture))
.settings(libraryDependencies ++= Seq(sttp))

lazy val clientakka = (project in file("elastic4s-client-akka"))
.dependsOn(core, testkit % "test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import scala.concurrent.{ExecutionContext, Future}
import scala.io.Source
import scala.util.{Failure, Success}
import sttp.client3._
import sttp.client3.asynchttpclient.future.AsyncHttpClientFutureBackend
import sttp.model.Uri
import sttp.model.Uri.{PathSegments, QuerySegment}

Expand Down Expand Up @@ -94,7 +93,7 @@ class SttpRequestHttpClient(nodeEndpoint: ElasticNodeEndpoint)(
object SttpRequestHttpClient {

private def defaultEc: ExecutionContext = ExecutionContext.global
private def defaultSttpBackend: SttpBackend[Future, Any] = AsyncHttpClientFutureBackend()
private def defaultSttpBackend: SttpBackend[Future, Any] = HttpClientFutureBackend()

/** Instantiate an [[SttpRequestHttpClient]] with reasonable defaults for the implicit parameters. */
def apply(nodeEndpoint: ElasticNodeEndpoint): SttpRequestHttpClient = new SttpRequestHttpClient(nodeEndpoint)(
Expand Down
1 change: 0 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ object Dependencies {
lazy val akkaActor = "com.typesafe.akka" %% "akka-actor" % AkkaVersion
lazy val akkaHTTP = "com.typesafe.akka" %% "akka-http" % AkkaHttpVersion
lazy val akkaStream = "com.typesafe.akka" %% "akka-stream" % AkkaVersion
lazy val asyncHttpClientBackendFuture = "com.softwaremill.sttp.client3" %% "async-http-client-backend-future" % SttpVersion
lazy val cats = "org.typelevel" %% "cats-effect" % CatsEffectVersion
lazy val cats2 = "org.typelevel" %% "cats-effect" % CatsEffect2Version
lazy val elasticsearchRestClient = "org.elasticsearch.client" % "elasticsearch-rest-client" % ElasticsearchVersion
Expand Down

0 comments on commit e2395f4

Please sign in to comment.