Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Response b = Response {}
- pattern Server :: Status -> b -> [Header] -> Response b
- pattern Client :: Status -> b -> [Header] -> Response b
- pattern Redirect :: Status -> b -> [Header] -> Response b
- pattern Success :: Status -> b -> [Header] -> Response b
- pattern Info :: Status -> b -> [Header] -> Response b
- data Status = Status Int ByteString
Documentation
The response produced by Http
.
Instances
Generic (Response b) Source # | |
Show (Response BodyReader) Source # | |
Defined in Polysemy.Http.Data.Response | |
Show b => Show (Response b) Source # | |
Eq b => Eq (Response b) Source # | |
type Rep (Response b) Source # | |
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.
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.