ResponseAs

sttp.client3.ResponseAs
See theResponseAs companion trait
object ResponseAs

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ResponseAs.type

Members list

Type members

Classlikes

implicit class RichResponseAsEither[A, B, R](ra: ResponseAs[Either[A, B], R])

Attributes

Supertypes
class Object
trait Matchable
class Any
implicit class RichResponseAsEitherResponseException[HE, DE, B, R](ra: ResponseAs[Either[ResponseException[HE, DE], B], R])

Attributes

Supertypes
class Object
trait Matchable
class Any

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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

Attributes

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.

Attributes

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.

Attributes

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]