PekkoHttpBackend

sttp.client4.pekkohttp.PekkoHttpBackend
See thePekkoHttpBackend companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

type EncodingHandler = PartialFunction[(HttpResponse, HttpEncoding), HttpResponse]

Value members

Concrete methods

def apply(options: BackendOptions, customHttpsContext: Option[HttpsConnectionContext], customConnectionPoolSettings: Option[ConnectionPoolSettings], customLog: Option[LoggingAdapter], customizeRequest: HttpRequest => HttpRequest, customizeWebsocketRequest: WebSocketRequest => WebSocketRequest, customizeResponse: (HttpRequest, HttpResponse) => HttpResponse, customEncodingHandler: EncodingHandler)(implicit ec: Option[ExecutionContext]): WebSocketStreamBackend[Future, PekkoStreams]

Value parameters

ec

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

Attributes

def stub(implicit ec: ExecutionContext): WebSocketStreamBackendStub[Future, PekkoStreams & WebSockets]

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 WebSocketStreamBackendStub for details on how to configure stub responses.

Attributes

def usingActorSystem(actorSystem: ActorSystem, options: BackendOptions, customHttpsContext: Option[HttpsConnectionContext], customConnectionPoolSettings: Option[ConnectionPoolSettings], customLog: Option[LoggingAdapter], customizeRequest: HttpRequest => HttpRequest, customizeWebsocketRequest: WebSocketRequest => WebSocketRequest, customizeResponse: (HttpRequest, HttpResponse) => HttpResponse, customEncodingHandler: EncodingHandler)(implicit ec: Option[ExecutionContext]): WebSocketStreamBackend[Future, PekkoStreams]

Value parameters

actorSystem

The actor system which will be used for the http-client actors.

ec

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

Attributes

def usingClient(actorSystem: ActorSystem, options: BackendOptions, customConnectionPoolSettings: Option[ConnectionPoolSettings], http: PekkoHttpClient, customizeRequest: HttpRequest => HttpRequest, customizeWebsocketRequest: WebSocketRequest => WebSocketRequest, customizeResponse: (HttpRequest, HttpResponse) => HttpResponse, customEncodingHandler: EncodingHandler)(implicit ec: Option[ExecutionContext]): WebSocketStreamBackend[Future, PekkoStreams]

Value parameters

actorSystem

The actor system which will be used for the http-client actors.

ec

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

Attributes