Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple Rack proxy server to turn JSON contents into JSONP format
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/rack
README.mdown
config.ru
jsonp_proxy_server.rb

README.mdown

Dead simple JSONP proxy server running on Rack. It turns JSON responses from any server to JSONP format.

Configuration

All you have to do is to set the proper endpoint url in config.ru file:

config['proxy.to'] = 'http://yourhost.com'

Usage

For example, if you want to turn the JSON contents from the url http://www.myhost.com/foo/bar.json to JSONP format, set the proxy.to configuration parameter to http://www.myhost.com. Launch this proxy server with rackup config.ru and fetch the JSONP contents from http://localhost:9292/foo/bar.json?callback=?

Something went wrong with that request. Please try again.