haste-compiler-0.2.99: Haskell To ECMAScript compiler

Safe HaskellNone

Haste.Ajax

Description

Low level XMLHttpRequest support. IE6 and older are not supported.

Synopsis

Documentation

data Method Source

Constructors

GET 
POST 

Instances

textRequest :: MonadIO m => Method -> URL -> [(Key, Val)] -> (Maybe String -> IO ()) -> m ()Source

Make an AJAX request to a URL, treating the response as plain text.

textRequest_ :: MonadIO m => Method -> JSString -> [(JSString, JSString)] -> (Maybe JSString -> IO ()) -> m ()Source

Same as textRequest but deals with JSStrings instead of Strings.

jsonRequest :: MonadIO m => Method -> URL -> [(Key, Val)] -> (Maybe JSON -> IO ()) -> m ()Source

Make an AJAX request to a URL, interpreting the response as JSON.

jsonRequest_ :: MonadIO m => Method -> JSString -> [(JSString, JSString)] -> (Maybe JSON -> IO ()) -> m ()Source

Does the same thing as jsonRequest but uses JSStrings instead of Strings.