AsyncClient

trait AsyncClient extends AsyncClientCompat with ClientFactory[AsyncClient] with AutoCloseable

A standard async http client interface for Scala Future

trait AutoCloseable
class Object
trait Matchable
class Any

Value members

Abstract methods

protected def channel: HttpChannel

Concrete methods

def callInternal[Req, Resp](req: Request, requestSurface: Surface, responseSurface: Surface, requestContent: Req): Future[Resp]
def readAsInternal[Resp](req: Request, responseSurface: Surface): Future[Resp]
def rpc[Req, Resp](method: RPCMethod, requestContent: Req): Future[Resp]
def send(req: Request): Future[Response]

Send an HTTP request and get the response in Scala Future type.

Send an HTTP request and get the response in Scala Future type.

It will return Future[HttpClientException] for non-successful responses. For example, when receiving non-retryable status code (e.g., 4xx), it will return Future[HttpClientException]. For server side failures (5xx responses), this continues request retry until the max retry count.

If it exceeds the number of max retry attempts, it will return Future[HttpClientMaxRetryException].

def sendSafe(req: Request): Future[Response]

Send an HTTP request and returns a response (or the last response if the request is retried)

Send an HTTP request and returns a response (or the last response if the request is retried)

Inherited methods

protected def build(newConfig: HttpClientConfig): ClientImpl

Create a new client sharing the same underlying http client

Create a new client sharing the same underlying http client

Inherited from:
ClientFactory
inline def call[Req, Resp](req: Request, requestContent: Req): Future[Resp]
Inherited from:
AsyncClientCompat
def close(): Unit
Inherited from:
AutoCloseable
inline def readAs[Resp](req: Request): Future[Resp]
Inherited from:
AsyncClientCompat
def withCircuitBreaker(filter: CircuitBreaker => CircuitBreaker): ClientImpl
Inherited from:
ClientFactory
def withClientFilter(filter: ClientFilter): ClientImpl
Inherited from:
ClientFactory
def withConfig(filter: HttpClientConfig => HttpClientConfig): ClientImpl
Inherited from:
ClientFactory
def withConnectTimeout(duration: Duration): ClientImpl
Inherited from:
ClientFactory
def withReadTimeout(duration: Duration): ClientImpl
Inherited from:
ClientFactory
def withRequestFilter(requestFilter: Request => Request): ClientImpl
Inherited from:
ClientFactory
def withRetryContext(filter: RetryContext => RetryContext): ClientImpl
Inherited from:
ClientFactory