polysemy-http-0.4.0.4: 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

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

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

Match on a response with a 5xx status.

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

Match on a response with a 4xx status.

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

Match on a response with a 3xx status.

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

Match on a response with a 2xx status.

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

Match on a response with a 1xx status.

data Status #

HTTP Status.

Only the statusCode is used for comparisons.

Please use mkStatus to create status codes from code and message, or the Enum instance or the status code constants (like ok200). There might be additional record members in the future.

Note that the Show instance is only for debugging.

Constructors

Status Int ByteString 

Instances

Instances details
Bounded Status 
Instance details

Defined in Network.HTTP.Types.Status

Enum Status 
Instance details

Defined in Network.HTTP.Types.Status

Eq Status 
Instance details

Defined in Network.HTTP.Types.Status

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Ord Status 
Instance details

Defined in Network.HTTP.Types.Status

Show Status 
Instance details

Defined in Network.HTTP.Types.Status