angularjs - Parse JSON to JSONP on the fly without using third parties -
i trying access codeforces api , providing json(but not jsonp) i'm making cross domain request, should jsonp.
so, i'm using third party json2jsonp, , works.
var cfurl = "http://json2jsonp.com/?url=http://codeforces.com/api/user.info?handles="; var runuserrequest = function(handle){ return $http({ method: 'jsonp', url: cfurl + handle + "&callback=cfhandle" }) }
finally, doubt is there elegant way without using third parties json2jsonp
thanks in advance
is there elegant way without using third parties json2jsonp
use 1 of following options:
- a reverse proxy server
- a greasemonkey script
- browser settings
references
Comments
Post a Comment