vasrap / ZF2-Restful-Module-Skeleton

A Zend Framework 2 module skeleton that works with the RestfulController
63 stars 34 forks source link

Response format in URI #9

Open moussadev opened 11 years ago

moussadev commented 11 years ago

To be a true restful module the format doesn't need to appear in the URL.

It would be better to use the "HttpAcceptStrategy" to to send the quering format.

vasrap commented 11 years ago

Thanks for pointing this out.

You are right that the format should't be on the URL, however it is easier and faster to be implemented by client code.

I think both options can co-exist and either selected via the configuration or the header option to have more gravity.

I have the feeling that the "Accept" header is more appropriate for asking for a content type.

nXqd commented 11 years ago

agree, there are many ways to archive the same thing and I prefer the formatter in the url and it's faster to implement in front end too :+1: