A small library of json calls.
Access using jsonlib.js (source and docs at jsonlib-src.js, and examples here), or using any ajax library that can make jsonp calls.
All calls below accept an optional "callback" cgi parameter for jsonp support, and all calls set "Access-Control-Allow-Origin: *" for cross-domain XHR support.
/ip - Returns the caller's ip address.
Example: http://call.jsonlib.com/ip.
/time - Returns the server's time in seconds since epoch.
Example: http://call.jsonlib.com/time?callback=cb8.
/echo - Echoes the cgi parameters as json.
Example: http://call.jsonlib.com/echo?a=first&b=second&callback=cb.
/urandom - Provides secure random bytes from the server.
Example: http://call.jsonlib.com/urandom?bytes=10&format=array&callback=seedrandom.
/fetch - Does a raw HTTP fetch.
Example: http://call.jsonlib.com/fetch?url=http://google.com/.
CGI parameters:
Author: David Bau