Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type ResponseHeader = RequestHeader
- type ResponseHeaders = RequestHeaders
- data Response
- data HttpResponse = HttpResponse {}
- data Status = Status {
- statusCode :: !Int
- statusMessage :: !Text
- type ResponseBody = Text
- fromHTTPHeader :: Header -> ResponseHeader
- fromHTTPHeaders :: ResponseHeaders -> ResponseHeaders
- fromHTTPStatus :: Status -> Status
- fromServantError :: ServantErr -> HttpResponse
- wrapInString :: Builder -> Builder
Documentation
type ResponseHeader = RequestHeader Source #
type ResponseHeaders = RequestHeaders Source #
Any message from the server is a Response.
Subscribed
: Resource was successfully subscribed
Response
: Resource was modified (this message is also triggered immediately after a subscription)
HttpRequestFailed
: The server replied with some none 2xx status code.
Thus your subscription failed or got removed.
ParseError
: Your request could not be parsed.
Subscribed !HttpRequest | |
Modified !HttpRequest !ResponseBody | |
Deleted !Path | |
Unsubscribed !HttpRequest | |
HttpRequestFailed !HttpRequest !HttpResponse | |
ParseError |
Instances
data HttpResponse Source #
Instances
Generic HttpResponse Source # | |
Defined in Servant.Subscriber.Response type Rep HttpResponse :: Type -> Type # from :: HttpResponse -> Rep HttpResponse x # to :: Rep HttpResponse x -> HttpResponse # | |
ToJSON HttpResponse Source # | |
Defined in Servant.Subscriber.Response toJSON :: HttpResponse -> Value # toEncoding :: HttpResponse -> Encoding # toJSONList :: [HttpResponse] -> Value # toEncodingList :: [HttpResponse] -> Encoding # | |
type Rep HttpResponse Source # | |
Defined in Servant.Subscriber.Response type Rep HttpResponse = D1 (MetaData "HttpResponse" "Servant.Subscriber.Response" "servant-subscriber-0.6.0.2-8XxgKdyeJag3QNEofxPbwB" False) (C1 (MetaCons "HttpResponse" PrefixI True) (S1 (MetaSel (Just "httpStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Status) :*: (S1 (MetaSel (Just "httpHeaders") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ResponseHeaders) :*: S1 (MetaSel (Just "httpBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ResponseBody)))) |
Status | |
|
Instances
Show Status Source # | |
Generic Status Source # | |
ToJSON Status Source # | |
Defined in Servant.Subscriber.Response | |
type Rep Status Source # | |
Defined in Servant.Subscriber.Response type Rep Status = D1 (MetaData "Status" "Servant.Subscriber.Response" "servant-subscriber-0.6.0.2-8XxgKdyeJag3QNEofxPbwB" False) (C1 (MetaCons "Status" PrefixI True) (S1 (MetaSel (Just "statusCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "statusMessage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) |
type ResponseBody = Text Source #
fromHTTPStatus :: Status -> Status Source #
wrapInString :: Builder -> Builder Source #