node.ajax

2.4.3 • Public • Published

node.ajax

npm

ajax for node

Installation

$ npm install node.ajax

Use with node

var ajax = require("node.ajax");
 
var res = yield ajax("http://domain:port","GET",{
    params: value
},{'Content-Type': 'application/x-www-form-urlencoded'},"utf8")

Use with window

var ajax = require("node.ajax");
 
// async (need a callback,return true)
var res = ajax("http://domain:port","GET",{
    params: value
},function(res){
    // do something ....
});
 
// sync (return response data)
var res = ajax("http://domain:port","GET",{
    params: value
});

jQuery like:

var $ = {
    ajax: require("node.ajax")
}

Readme

Keywords

Package Sidebar

Install

npm i node.ajax

Weekly Downloads

14

Version

2.4.3

License

MIT

Last publish

Collaborators

  • yeliex