On 4/18/07, <b class="gmail_sendername">Jonas Pfenniger</b> &lt;<a href="mailto:zimbatm@oree.ch">zimbatm@oree.ch</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Carmen,<br><br>to avoid patching Camping, I suggest you look into overriding the<br>&quot;service&quot; method for the target controllers. You can do this in your<br>main application module or by including a custom module in your
<br>controllers, as you prefer. Let me know if you need more hints.</blockquote><div><br>I was going to suggest the same thing, but when I looked at it, it wasn&#39;t clear if this would allow for grabbing data like the request headers (allowing you to determine what form the submitted data takes). Based on the code Carmen posted, it looks like the idea is to be able to use the same controllers whether the data comes in from regular requests or as JSON data. Granted, that could still be done in the controllers, but it does end up being a bit less elegant.
<br clear="all"></div></div><br>-- <br>Thomas Lockney | <a href="mailto:tlockney@gmail.com">tlockney@gmail.com</a> | <a href="http://opposable-thumbs.net">http://opposable-thumbs.net</a>