polysemy-http-0.10.0.0: Polysemy effects for HTTP clients
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Http.Data.Response

Description

 
Synopsis

Documentation

data Response b Source #

The response produced by Http.

Constructors

Response 

Fields

Instances

Instances details
Generic (Response b) Source # 
Instance details

Defined in Polysemy.Http.Data.Response

Associated Types

type Rep (Response b) :: Type -> Type #

Methods

from :: Response b -> Rep (Response b) x #

to :: Rep (Response b) x -> Response b #

Show (Response BodyReader) Source # 
Instance details

Defined in Polysemy.Http.Data.Response

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 #

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 #

type Rep (Response b) Source # 
Instance details

Defined in Polysemy.Http.Data.Response

type Rep (Response b) = D1 ('MetaData "Response" "Polysemy.Http.Data.Response" "polysemy-http-0.10.0.0-87e6jzWvAayEr6XBhgr0fG" 'False) (C1 ('MetaCons "Response" 'PrefixI 'True) ((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel ('Just "headers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Header]) :*: S1 ('MetaSel ('Just "cookies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CookieJar))))

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

Show 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