misoproject/dataset

customisable jsonp callback parameter and function

Closed this issue · 1 comments

Unless I've missed something, as far as I can tell the only way to use jsonp is to always include 'callback=' as the final thing in the url and then rely on the service being called to support 'callback' as a parameter (or to have hardcoded 'callback' as the wrapping function).

That's useful as a convention, but it might be nice if either:

a) It was explicit in the documentation that this is the case. I spent a while assuming I could - and trying to figure out how - to set a callback parameter name.
b) Was actually customisable. So I can make requests with &myOwnCallbackParam=myOwnCallbackFunctionName.

Yea was a bit awkward and undocumented. Will update the documentation when we release a new version next week. Now supports setting the callback via a param or the url or not at all, in which case it's generated.