Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panthershark/xhr-browserify
Browserify compatible xhr module with support for jsonp
https://github.com/panthershark/xhr-browserify
Last synced: about 2 months ago
JSON representation
Browserify compatible xhr module with support for jsonp
- Host: GitHub
- URL: https://github.com/panthershark/xhr-browserify
- Owner: panthershark
- License: mit
- Created: 2013-12-31T19:55:30.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-23T16:24:26.000Z (over 9 years ago)
- Last Synced: 2024-11-06T01:43:25.842Z (2 months ago)
- Language: JavaScript
- Size: 263 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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