JSONP property for cherrypy


/ Published in: Python
Save to your folder(s)

This is a @property to take care of jsonp stuff if you're using CherryPy.
In your Javascript, (you're using JQuery, right?) you can do
`
$.ajax({url:"localhost:8080/MyMethod", data:{'arg1':'foo'}, dataType:"jsonp", success:onMyMethodComplete});
`
and you will get back your JS datastructure without having to worry about the jsonp stuff yourself.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.