haste-compiler-0.5.5.0: Haskell To ECMAScript compiler

Safe HaskellNone
LanguageHaskell98

Haste.Ajax

Description

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

Synopsis

Documentation

data Method

Constructors

GET 
POST 

Instances

type URL = String

ajaxRequest

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 :: [((), ())]

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