polysemy-http-0.1.0.0: Polysemy effect for http-client
Safe HaskellNone
LanguageHaskell2010

Polysemy.Http.Data.Response

Synopsis

Documentation

data Response b Source #

The response produced by Http.

Constructors

Response 

Fields

  • status :: Status

    Uses the type from HTTP for convenience

  • body :: b

    parameterized in the body to allow different interpreters to use other representations.

  • headers :: [Header]

    Does not use the type from HTTP because it is an alias.

Instances

Instances details
Eq b => Eq (Response b) Source # 
Instance details

Defined in Polysemy.Http.Data.Response

Methods

(==) :: Response b -> Response b -> Bool #

(/=) :: Response b -> Response b -> Bool #

Show b => Show (Response b) Source # 
Instance details

Defined in Polysemy.Http.Data.Response

Methods

showsPrec :: Int -> Response b -> ShowS #

show :: Response b -> String #

showList :: [Response b] -> ShowS #

Show (Response BodyReader) Source # 
Instance details

Defined in Polysemy.Http.Data.Response

Methods

showsPrec :: Int -> Response BodyReader -> ShowS #

show :: Response BodyReader -> String #

showList :: [Response BodyReader] -> ShowS #

pattern Info :: Status -> b -> [Header] -> Response b Source #

Match on a response with a 1xx status.

pattern Success :: Status -> b -> [Header] -> Response b Source #

Match on a response with a 2xx status.

pattern Redirect :: Status -> b -> [Header] -> Response b Source #

Match on a response with a 3xx status.

pattern Client :: Status -> b -> [Header] -> Response b Source #

Match on a response with a 4xx status.

pattern Server :: Status -> b -> [Header] -> Response b Source #

Match on a response with a 5xx status.