How to set and get request format in Zend?
I wonder if there's a way to get the "json" part from this url: "_/post/index.**json**_", or, if not present, "html" by default, just like doing "request.format" in Rails.

I also wonder if this can be set on the routes as a param. Doing:

    resources.router.routes.default.route = /:controller/:action.:format

on the ini file won't work, it seems like the only way to separate params is by adding /.

Is this possible with Zend or do I have to code it myself?
How to set and get request format in Zend?
===

I wonder if there's a way to get the "json" part from this url: "_/post/index.**json**_", or, if not present, "html" by default, just like doing "request.format" in Rails.

I also wonder if this can be set on the routes as a param. Doing:

    resources.router.routes.default.route = /:controller/:action.:format

on the ini file won't work, it seems like the only way to separate params is by adding /.

Is this possible with Zend or do I have to code it myself?