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