In my case, I was looking for a way to change the HTTP verb mappings with AgaviWebRequest methods.
Agavi maps executeCreate() with HTTP PUT and executeWrite() with HTTP POST. If I use these functions in the context of REST architecture, it makes more sense if they are mapped the other way around. Although I understand that there is no single way to implement REST, there seems to be a general agreement that update operations should be mapped to HTTP PUT while create operations should be mapped to HTTP POST.
Fortunately, Agavi provides a simple (undocumented) way to change the mappings. In config/factories.xml, simply add:
<request class="AgaviWebRequest">Thanks to the crazy guy, MikeSeth. =)
Post a Comment