Closed codeguy closed 12 years ago
This link was provided by @silentworks as reference for this issue.
It is not really the same thing but in similar vein I built a library of sorts to handle this by using the "Accept" header. Basically you can pass the name of a template and an array of data. It determines how to distribute the data (HTML/template, JSON, or XML) based on the request header. I have even wrote a Slim view file for a RESTful api I am building.
Again I realize that it is probably not what you are looking for but it might be an interesting way to do it. The project can be found at https://github.com/danielhardy/GNexus - (I am not much of a developer so please feel free to give me any feedback if you do check it out)
Cheers!
Awesome. I have no idea if this will work, but I'll certainly take a look later tonight! Thanks.
Considering this issue resolved with the Slim_Middleware_ContentTypes
middleware class in v1.5.2. I will introduce this middleware in a blog post early this week.
Parse GET, POST, PUT request parameters for JSON and XML content-types just as we do already for form-urlencoded requests.