AsyncClientImpl

wvlet.airframe.http.client.AsyncClientImpl
class AsyncClientImpl(val channel: HttpChannel, val config: HttpClientConfig) extends AsyncClient

Attributes

Graph
Supertypes
trait AsyncClient
trait AutoCloseable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override protected def build(newConfig: HttpClientConfig): AsyncClient

Create a new client sharing the same underlying http client

Create a new client sharing the same underlying http client

Attributes

Definition Classes
override def close(): Unit

Attributes

Definition Classes
AsyncClient -> AutoCloseable

Inherited methods

inline def call[Req, Resp](req: Request, requestContent: Req): Rx[Resp]

Attributes

Inherited from:
AsyncClientCompat
def callInternal[Req, Resp](req: Request, requestSurface: Surface, responseSurface: Surface, requestContent: Req): Rx[Resp]

Attributes

Inherited from:
AsyncClient
inline def readAs[Resp](req: Request): Rx[Resp]

Attributes

Inherited from:
AsyncClientCompat
def readAsInternal[Resp](req: Request, responseSurface: Surface): Rx[Resp]

Attributes

Inherited from:
AsyncClient
def rpc[Req, Resp](method: RPCMethod, requestContent: Req): Rx[Resp]

Attributes

Throws
RPCException

when RPC request fails

Inherited from:
AsyncClient
def send(req: Request, context: HttpClientContext): Rx[Response]

Send an HTTP request and get the response in Rx[Response] type.

Send an HTTP request and get the response in Rx[Response] type.

It will return Rx[HttpClientException] for non-successful responses. For example, when receiving non-retryable status code (e.g., 4xx), it will return Rx[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 Rx[HttpClientMaxRetryException].

Attributes

Inherited from:
AsyncClient
def sendSafe(req: Request, context: HttpClientContext): Rx[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)

Attributes

Inherited from:
AsyncClient
def withCircuitBreaker(filter: CircuitBreaker => CircuitBreaker): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withClientFilter(filter: RxHttpFilter): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withClientFilter(filter: HttpClientFilter): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withConfig(filter: HttpClientConfig => HttpClientConfig): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withConnectTimeout(duration: Duration): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withReadTimeout(duration: Duration): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withRequestFilter(requestFilter: Request => Request): ClientImpl

Attributes

Inherited from:
HttpClientFactory
def withRetryContext(filter: RetryContext => RetryContext): ClientImpl

Attributes

Inherited from:
HttpClientFactory

Concrete fields

protected val channel: HttpChannel