haste-compiler-0.5.1.1: Haskell To ECMAScript compiler

Safe HaskellNone
LanguageHaskell98

Haste.Ajax

Description

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

Synopsis

Documentation

data Method Source

Constructors

GET 
POST 

Instances

ajaxRequest Source

Arguments

:: (MonadIO m, JSType a, JSType b, JSType c) 
=> Method

GET or POST. For GET, pass all params in URL. For POST, pass all params as post data.

-> URL

URL to make AJAX request to.

-> [(a, b)]

A list of (key, value) parameters.

-> (Maybe c -> IO ())

Callback to invoke on completion.

-> m () 

Perform an AJAX request.

noParams :: [((), ())] Source

Pass to ajaxRequest instead of [] when no parameters are needed, to avoid type ambiguity errors.