xhr-browserify

0.0.4 • Public • Published

xhr-browserify

Browserify compatible xhr module with support for jsonp

Simple case, in domain request.

var xhr = require('xhr-browserify');

xhr('/path/to/api?dogs=paws', function(err, data) {
  console.log(data);
});

JSONP

var xhr = require('xhr-browserify');
var uri = require('url').parse('http://www.foo.com/path/to/api?dogs=paws', true);

xhr(uri, { jsonp: true }, function(err, data) {
  console.log(data);
});

Options

  • jsonp: if true, then a callback is sent to the server and the output is parsed. default: false

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    4
  • 0.0.3
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i xhr-browserify

Weekly Downloads

5

Version

0.0.4

License

MIT

Last publish

Collaborators

  • tommydudebreaux