sttp.client4.impl.zio

Members list

Type members

Classlikes

implicit class BackendExtendEnv[R0](delegate: Backend[[_] =>> RIO[R0, _$1]])

Attributes

Supertypes
class Object
trait Matchable
class Any
class FetchZioBackend extends AbstractFetchBackend[Task, ZioStreams], WebSocketStreamBackend[Task, ZioStreams]

Uses the ReadableStream interface from the Streams API.

Uses the ReadableStream interface from the Streams API.

Streams are behind a flag on Firefox.

Note that no browsers support a stream request body so it is converted into an in memory array first.

Attributes

See also
Companion
object
Supertypes
trait WebSocketStreamBackend[Task, ZioStreams]
trait StreamBackend[Task, ZioStreams]
class AbstractFetchBackend[Task, ZioStreams]
trait WebSocketBackend[Task]
trait Backend[Task]
trait GenericBackend[Task, ZioStreams & WebSockets]
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class RIOMonadAsyncError[R] extends MonadAsyncError[[_] =>> RIO[R, _$1]]

Attributes

Supertypes
trait MonadAsyncError[[_] =>> RIO[R, _$1]]
trait MonadError[[_] =>> RIO[R, _$1]]
class Object
trait Matchable
class Any
implicit class StreamBackendExtendEnv[R0, S](delegate: StreamBackend[[_] =>> RIO[R0, _$7], S])

Attributes

Supertypes
class Object
trait Matchable
class Any
implicit class WebSocketBackendExtendEnv[R0](delegate: WebSocketBackend[[_] =>> RIO[R0, _$4]])

Attributes

Supertypes
class Object
trait Matchable
class Any
implicit class WebSocketStreamBackendExtendEnv[R0, S](delegate: WebSocketStreamBackend[[_] =>> RIO[R0, _$10], S])

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object ZioWebSockets

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Types

type SttpClient = WebSocketStreamBackend[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 send[T](request: WebSocketRequest[Task, T]): ZIO[SttpClient, Throwable, Response[T]]

Sends the given WebSocket request.

Sends the given WebSocket 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](request: WebSocketStreamRequest[T, ZioStreams]): ZIO[SttpClient, Throwable, Response[T]]

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

Sends the given WebSocket request, where the request body or the response WebSocket 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, _$13]], 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

def sendR[T, R](request: WebSocketRequest[[_] =>> RIO[R, _$15], T]): ZIO[SttpClient & R, Throwable, Response[T]]

A variant of send which allows the effects that are part of the response handling specification (when using websockets or 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 websockets or resource-safe streaming) to use an R environment.

Attributes

Implicits

Implicits

final implicit def BackendExtendEnv[R0](delegate: Backend[[_] =>> RIO[R0, _$1]]): BackendExtendEnv[R0]
final implicit def StreamBackendExtendEnv[R0, S](delegate: StreamBackend[[_] =>> RIO[R0, _$7], S]): StreamBackendExtendEnv[R0, S]
final implicit def WebSocketBackendExtendEnv[R0](delegate: WebSocketBackend[[_] =>> RIO[R0, _$4]]): WebSocketBackendExtendEnv[R0]
final implicit def WebSocketStreamBackendExtendEnv[R0, S](delegate: WebSocketStreamBackend[[_] =>> RIO[R0, _$10], S]): WebSocketStreamBackendExtendEnv[R0, S]