I am using a package called fetchJsonp. However, it keeps failing due to timing out. I am not sure if I am doing something wrong.
fetchJsonp('kayak.com/h/mobileapis/directory/airlines/homework', {
jsonpCallback: 'jsonp',
})
.then(function (response) {
return response.json();
})
.then(function (json) {
console.log('parsed json', json);
})
.catch(function (ex) {
console.log('parsing failed', ex);
});
Any help is appreciated.