ghcjs-ajax-0.2.0.0: Crossbrowser AJAX Bindings for GHCJS

Safe HaskellNone
LanguageHaskell2010

JavaScript.Ajax

Synopsis

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

data StdMethod :: * #

HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH 

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