klein / klein.php

A fast & flexible router
MIT License
2.66k stars 290 forks source link

Some way to automagically jsonp #303

Open schorsch3000 opened 8 years ago

schorsch3000 commented 8 years ago

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?