Ben Bangert wrote:
> On Jan 29, 2008, at 3:27 PM, Ian Bicking wrote:
>
>> While _method=DELETE mostly makes sense to me (you aren't effecting the
>> natural body, since DELETE doesn't have a body), I still don't get how
>> this works with PUT. It's not a PUT. Why pretend it's a PUT? It feels
>> like an abuse of the term.
>
> So that you have a API that works with browsers and real service
> consumers (that do know PUT). Again, its purely for browsers since they
> can't do PUT/DELETE. In the case of faking a DELETE from a web browser,
> you will not actually be sending a DELETE (browser's can't), so you do a
> POST and in the body you have the _method=DELETE. Same thing for a PUT.
Why don't you just match method=('PUT', 'POST') so the same route
accepts both verbs? Calling a POST a PUT is just silly.
> You pretend its a PUT so that you can code up a single controller that
> is compatible with both browsers *and* service oriented clients.
Yes, but service based clients and browsers send totally different
request bodies. Making them look like they were submitted with same
verb doesnt change that.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---