Skip to content
No description or website provided.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
test
.gitignore
README.md
bower.json
main.js
origami.json
package.json

README.md

o-fetch-jsonp

Client side fetch wrapper that fallbacks to JSONP

Client

Uses fetch, but fallbacks to a fetch-like interface using JSONP under the hood

Install

bower install -S o-fetch-jsonp

Usage

import fetchJsonp from 'o-fetch-jsonp';
const opts = {
    timeout: 1000
};
fetchJsonp('http://other.domain.com/foo', opts)
    .then(data => {
        ...
    });

Note: If using CommonJS modules,

const fetchJsonp = require('o-fetch-jsonp').default;

Where opts can take

  • {number} [timeout=2000]
You can’t perform that action at this time.