Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace deprecated AsyncHttpClientFutureBackend #3148

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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