xcat-ajax

0.2.1 • Public • Published

使用 node api 实现的 ajax 请求,browserify 之后可以方便的在浏览器端使用

使用方式

var ajax = require('mtfe_ajax');
 
ajax({
  url: '/hello',
  data: {
    foo: 'bar'
  },
  callback: function(error, data) {
    if (error) {
      // Do something with the error
    }
    console.log(data);
  }
});
 

Readme

Keywords

Package Sidebar

Install

npm i xcat-ajax

Weekly Downloads

1

Version

0.2.1

License

MIT

Last publish

Collaborators

  • xcatliu