Skip to content

Latest commit

 

History

History
189 lines (137 loc) · 3 KB

File metadata and controls

189 lines (137 loc) · 3 KB

Module Data.DOM.Simple.Ajax

ReadyState

data ReadyState
  = Unsent
  | Opened
  | HeadersReceived
  | Loading
  | Done
  | Unknown Int

Url

type Url = String

HttpMethod

data HttpMethod
  = GET
  | POST
  | PUT
  | DELETE
  | PATCH
  | HEAD
  | OPTIONS
  | JSONP
  | HttpMethod String
Instances
instance showHttpMethod :: Show HttpMethod

ResponseType

data ResponseType
  = Default
  | ArrayBuffer
  | Blob
  | Document
  | Json
  | Text
  | MozBlob
  | MozChunkedText
  | MozChunkedArrayBuffer
Instances
instance showResponseType :: Show ResponseType

ArrayBuffer

data ArrayBuffer :: *

ArrayBufferView

data ArrayBufferView :: *

Blob

data Blob :: *

FormData

data FormData :: *

HttpData

data HttpData a
  = NoData
  | TextData String
  | ArrayBufferData ArrayBuffer
  | ArrayBufferViewData ArrayBufferView
  | BlobData Blob
  | FormData FormData
  | DocumentData HTMLDocument
  | JsonData a

makeXMLHttpRequest

makeXMLHttpRequest :: forall eff. Eff (dom :: DOM | eff) XMLHttpRequest

readyState

readyState :: forall eff. XMLHttpRequest -> Eff (dom :: DOM | eff) ReadyState

onReadyStateChange

onReadyStateChange :: forall eff e. Eff e Unit -> XMLHttpRequest -> Eff (dom :: DOM | eff) Unit

open

open :: forall eff. HttpMethod -> Url -> XMLHttpRequest -> Eff (dom :: DOM | eff) Unit

send

send :: forall eff a. HttpData a -> XMLHttpRequest -> Eff (dom :: DOM | eff) Unit

setResponseType

setResponseType :: forall eff. ResponseType -> XMLHttpRequest -> Eff (dom :: DOM | eff) Unit

responseType

responseType :: forall eff. XMLHttpRequest -> Eff (dom :: DOM | eff) ResponseType

response

response :: forall eff a. XMLHttpRequest -> Eff (dom :: DOM | eff) (HttpData a)

responseText

responseText :: forall eff. XMLHttpRequest -> Eff (dom :: DOM | eff) String

status

status :: forall eff. XMLHttpRequest -> Eff (dom :: DOM | eff) Int

statusText

statusText :: forall eff. XMLHttpRequest -> Eff (dom :: DOM | eff) String

setRequestHeader

setRequestHeader :: forall eff. String -> String -> XMLHttpRequest -> Eff (dom :: DOM | eff) Unit

getAllResponseHeaders

getAllResponseHeaders :: forall eff. XMLHttpRequest -> Eff (dom :: DOM | eff) String

getResponseHeader

getResponseHeader :: forall eff. String -> XMLHttpRequest -> Eff (dom :: DOM | eff) (Maybe String)

overrideMimeType

overrideMimeType :: forall eff. String -> XMLHttpRequest -> Eff (dom :: DOM | eff) Unit