ResponseAs

object ResponseAs
Companion:
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

implicit implicit class RichResponseAsEither[A, B, R](ra: ResponseAs[Either[A, B], R])
implicit implicit class RichResponseAsEitherResponseException[HE, DE, B, R](ra: ResponseAs[Either[ResponseException[HE, DE], B], R])

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def deserializeCatchingExceptions[T](doDeserialize: String => T): String => Either[DeserializationException[Exception], T]

Returns a function, which attempts to deserialize Right values using the given function, catching any exceptions and representing them as DeserializationException s.

Returns a function, which attempts to deserialize Right values using the given function, catching any exceptions and representing them as DeserializationException s.

def deserializeOrThrow[E : ShowError, T](doDeserialize: String => Either[E, T]): String => T

Converts a deserialization function, which returns errors of type E, into a function where errors are thrown as exceptions, and results are returned unwrapped.

Converts a deserialization function, which returns errors of type E, into a function where errors are thrown as exceptions, and results are returned unwrapped.

def deserializeRightCatchingExceptions[T](doDeserialize: String => T): (Either[String, String], ResponseMetadata) => Either[ResponseException[String, Exception], T]

Returns a function, which maps Left values to HttpError s, and attempts to deserialize Right values using the given function, catching any exceptions and representing them as DeserializationException s.

Returns a function, which maps Left values to HttpError s, and attempts to deserialize Right values using the given function, catching any exceptions and representing them as DeserializationException s.

def deserializeRightOrThrow[E : ShowError, T](doDeserialize: String => Either[E, T]): Either[String, String] => Either[String, T]

Returns a function, which keeps Left unchanged, and attempts to deserialize Right values using the given function. If deserialization fails, an exception is thrown

Returns a function, which keeps Left unchanged, and attempts to deserialize Right values using the given function. If deserialization fails, an exception is thrown

def deserializeRightWithError[E : ShowError, T](doDeserialize: String => Either[E, T]): (Either[String, String], ResponseMetadata) => Either[ResponseException[String, E], T]

Returns a function, which maps Left values to HttpError s, and attempts to deserialize Right values using the given function.

Returns a function, which maps Left values to HttpError s, and attempts to deserialize Right values using the given function.

def deserializeWithError[E : ShowError, T](doDeserialize: String => Either[E, T]): String => Either[DeserializationException[E], T]

Converts a deserialization function, which returns errors of type E, into a function where errors are wrapped using DeserializationException.

Converts a deserialization function, which returns errors of type E, into a function where errors are wrapped using DeserializationException.

def isWebSocket[T, R](ra: ResponseAs[_, _]): Boolean

Implicits

Implicits

final implicit def RichResponseAsEither[A, B, R](ra: ResponseAs[Either[A, B], R]): RichResponseAsEither[A, B, R]
final implicit def RichResponseAsEitherResponseException[HE, DE, B, R](ra: ResponseAs[Either[ResponseException[HE, DE], B], R]): RichResponseAsEitherResponseException[HE, DE, B, R]