RichResponseAsEither

class RichResponseAsEither[A, B, R](ra: ResponseAs[Either[A, B], R])
class Object
trait Matchable
class Any

Value members

Concrete methods

def getRight: ResponseAs[B, R]

If the type to which the response body should be deserialized is an Either[A, B]:

If the type to which the response body should be deserialized is an Either[A, B]:

  • in case of A, throws as an exception / returns a failed effect (wrapped with an HttpError if A is not yet an exception)
  • in case of B, returns the value directly
def mapLeft[L2](f: A => L2): ResponseAs[Either[L2, B], R]
def mapRight[R2](f: B => R2): ResponseAs[Either[A, R2], R]