klein/klein.php

Some way to automagically jsonp

Opened this issue · 0 comments

I'm going to build a javascript-onpage-app with a backend in php.
I'm going to use klein as my preferred router.
It will be usable directly in the browser and also will be shipped as an cordava-app.
so every single route in this setup will be called for json or jsonp.
it would be neat to have that response to figure it self if it should be json or jsonp according to the parameter name you tell it ('callback' by default).
For the first prototype i'll quick-patch that into the response.
is such behavior something you are like to see be implemented?