Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 728 Bytes

File metadata and controls

34 lines (27 loc) · 728 Bytes

Flapjax

Monadic Ajax module

Usage

// type Config = {
//   url : String,
//   method : String,
//   body [OPTIONAL] : String,
//   responseType [OPTIONAL] : String
//   timeout [OPTIONAL] : Number,
//   withCredentials [OPTIONAL] : Bool
//   headers [OPTIONAL] : { String : String }  
//   events [OPTIONAL] : { 
//     loadstart : (Event) -> (),
//     progress : (Event) -> (),
//     abort : (Event) -> (),
//     error : (Event) -> (),
//     load : (Event) -> (),
//     timeout : (Event) -> (),
//     loadend : (Event) -> (),
//   }
// }
//
// flapjax :: Config -> Future XHR
const future = flapjax(config);

To use the future, please review the Fluture API