Skip to content

cslarson/tinyxhr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tinyxhr

tinyxhr by Shimon Doodkin - licanse: public doamin - https://gist.github.com/4706967

var xhr = require("tinyxhr");
xhr("http://site.com/ajaxaction", function (err,data,xhr){ 
  if (err) {
    console.log("goterr ",err,'status='+xhr.status); 
    console.log(data);
  }
});
xhr("http://site.com/ajaxaction", function (err,data,xhr){ 
  if (err) {
    console.log("goterr ",err,'status='+xhr.status);
    console.log(data);
  }
}, 'POST', 'value1=1&value2=2');
xhr("http://site.com/ajaxaction.json", function (err,data,xhr){ 
  if (err) {
    console.log("goterr ",err,'status='+xhr.status); 
    console.log(data); console.log(JSON.parse(data));
  }
}, 'POST', JSON.stringify({value:1}), 'application/javascript');

About

repo for tinyxhr by Shimon Doodkin - https://gist.github.com/4706967

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published