AsyncHttpClientFutureBackend

Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(options: SttpBackendOptions, customizeRequest: BoundRequestBuilder => BoundRequestBuilder)(implicit ec: ExecutionContext): SttpBackend[Future, Any]
Value parameters:
ec

The execution context for running non-network related operations, e.g. mapping responses. Defaults to the global execution context.

def stub(implicit ec: ExecutionContext): SttpBackendStub[Future, Any]

Create a stub backend for testing, which uses the Future response wrapper, and doesn't support streaming.

Create a stub backend for testing, which uses the Future response wrapper, and doesn't support streaming.

See SttpBackendStub for details on how to configure stub responses.

def usingClient(client: AsyncHttpClient, customizeRequest: BoundRequestBuilder => BoundRequestBuilder)(implicit ec: ExecutionContext): SttpBackend[Future, Any]
Value parameters:
ec

The execution context for running non-network related operations, e.g. mapping responses. Defaults to the global execution context.

def usingConfig(cfg: AsyncHttpClientConfig, customizeRequest: BoundRequestBuilder => BoundRequestBuilder)(implicit ec: ExecutionContext): SttpBackend[Future, Any]
Value parameters:
ec

The execution context for running non-network related operations, e.g. mapping responses. Defaults to the global execution context.

def usingConfigBuilder(updateConfig: Builder => Builder, options: SttpBackendOptions, customizeRequest: BoundRequestBuilder => BoundRequestBuilder)(implicit ec: ExecutionContext): SttpBackend[Future, Any]
Value parameters:
ec

The execution context for running non-network related operations, e.g. mapping responses. Defaults to the global execution context.

updateConfig

A function which updates the default configuration (created basing on options).