SttpRequestHttpClient

com.sksamuel.elastic4s.sttp.SttpRequestHttpClient
See theSttpRequestHttpClient companion object
class SttpRequestHttpClient(nodeEndpoint: ElasticNodeEndpoint)(implicit ec: ExecutionContext, sttpBackend: SttpBackend[Future, Any]) extends HttpClient

Attributes

Companion
object
Graph
Supertypes
trait HttpClient
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Value members

Deprecated constructors

def this(clientUri: ElasticsearchClientUri)

Alternative constructor for backwards compatibility.

Alternative constructor for backwards compatibility.

Attributes

Deprecated
true

Concrete methods

def async(method: String, endpoint: String, params: Map[String, Any], headers: Map[String, String]): Request[String, Any]
def async(method: String, endpoint: String, params: Map[String, Any], headers: Map[String, String], entity: HttpEntity): Request[String, Any]
override def close(): Unit

Closes the underlying http client. Can be a no-op if the underlying client does not have state that needs to be closed.

Closes the underlying http client. Can be a no-op if the underlying client does not have state that needs to be closed.

Attributes

Definition Classes
HttpClient -> AutoCloseable
override def send(request: ElasticRequest, callback: Either[Throwable, HttpResponse] => Unit): Unit

Sends the given request to elasticsearch.

Sends the given request to elasticsearch.

Implementations should invoke the callback function once the response is known.

The callback function should be invoked with a HttpResponse for all requests that received a response, including 4xx and 5xx responses. The callback function should only be invoked with an exception if the client failed.

Attributes

Definition Classes
HttpClient

Inherited fields

protected val logger: Logger

Attributes

Inherited from:
HttpClient