sttp.client4.armeria.zio

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

type SttpClient = StreamBackend[Task, ZioStreams]

Type alias to be used as the sttp ZIO service (mainly in ZIO environment).

Type alias to be used as the sttp ZIO service (mainly in ZIO environment).

Attributes

Value members

Concrete methods

def send[T](request: Request[T]): ZIO[SttpClient, Throwable, Response[T]]

Sends the given request.

Sends the given request.

The response body is deserialized as specified by this request (see Request.response).

Known exceptions are converted by backends to one of SttpClientException. Other exceptions are kept unchanged.

Attributes

Returns

An effect, containing a Response, with the body handled as specified by this request (see Request.response). Or a failed effect, if an exception occurred when connecting to the target host, writing the request or reading the response.

def send[T, C >: ZioStreams & Effect[Task]](request: StreamRequest[T, C]): ZIO[SttpClient, Throwable, Response[T]]

Sends the given request, where the request body or the response body is handled as a stream.

Sends the given request, where the request body or the response body is handled as a stream.

The response body is deserialized as specified by this request (see Request.response).

Known exceptions are converted by backends to one of SttpClientException. Other exceptions are kept unchanged.

Attributes

Returns

An effect, containing a Response, with the body handled as specified by this request (see Request.response). Or a failed effect, if an exception occurred when connecting to the target host, writing the request or reading the response.

def sendR[T, C >: ZioStreams & Effect[[_] =>> RIO[R, _$1]], R](request: StreamRequest[T, C]): ZIO[SttpClient & R, Throwable, Response[T]]

A variant of send which allows the effects that are part of the response handling specification (when using resource-safe streaming) to use an R environment.

A variant of send which allows the effects that are part of the response handling specification (when using resource-safe streaming) to use an R environment.

Attributes