An open API service indexing awesome lists of open source software.

https://github.com/max-mapper/jsonpify

turn json apis into jsonp apis through a heroku proxy!
https://github.com/max-mapper/jsonpify

Last synced: 12 months ago
JSON representation

turn json apis into jsonp apis through a heroku proxy!

Awesome Lists containing this project

README

          

h1. JSONP-ifier!!!!!

h2. Turns any JSON API into a JSONP API through the magic of proxying

So you are trying to AJAX some JSON, right? And you run into the single origin policy? And the JSON API that you're hitting hasn't implemented JSONP? Dang! Here's an example of what you might do:

bc. $.getJSON("http://api.plancast.com/02/plans/show.json?plan_id=34ck", function(data) { doStuffWith(data)});

But instead of precious data, you would receive nasty CSRF error!

Fret not, young internet warrior! You can wrap that little puppy in a JSONPify URL for maximum JSONPification!

bc. $.ajax({
url: "http://jsonpify.heroku.com?resource=http://api.plancast.com/02/plans/show.json",
data: {
plan_id: '34ck'
}
dataType: 'jsonp',
success: function(data){
// manipulate data
}
});

h2. Installation

Clone this repository, then run:

bc. $ rackup

Then, open http://localhost:9292/.