https://github.com/franzose/jsonp-es6
Tiny JSONP request wrapper with modern promises support
https://github.com/franzose/jsonp-es6
es6 javascript jsonp jsonp-requests promises
Last synced: about 1 year ago
JSON representation
Tiny JSONP request wrapper with modern promises support
- Host: GitHub
- URL: https://github.com/franzose/jsonp-es6
- Owner: franzose
- License: mit
- Created: 2015-11-11T00:11:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T05:25:04.000Z (about 9 years ago)
- Last Synced: 2025-05-06T22:59:24.062Z (about 1 year ago)
- Topics: es6, javascript, jsonp, jsonp-requests, promises
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/jsonp-es6)
# JSONP with promises
This tiny library is based on Lightweight JSONP: https://github.com/erikarenhill/Lightweight-JSONP and allows to use promises along with JSONP requests.
Usage:
```javascript
var jsonp = require('jsonp-promise'),
url = 'http://example.com',
params = {
param1: 'param1',
param2: 'param2'
};
jsonp(url, params)
.then((result) => {
// something useful
});
```