Safe Haskell | None |
---|---|
Language | Haskell2010 |
- sendRequest :: StdMethod -> Text -> Maybe RequestBody -> Maybe ContentType -> IO AjaxResponse
- data StdMethod :: *
- data Status :: * = Status {}
- type RequestBody = Text
- type ContentType = Text
- data AjaxResponse = AjaxResponse {}
Documentation
sendRequest :: StdMethod -> Text -> Maybe RequestBody -> Maybe ContentType -> IO AjaxResponse Source #
Send an ajax request provided a HTTP-Method, a target url, optional a request body and content type and a completion callback
HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).
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.
type RequestBody = Text Source #
type ContentType = Text Source #