Ben Bangert wrote:
> On Jan 29, 2008, at 1:05 PM, Ian Bicking wrote:
>> I didn't realize it was in the body, not a query string.  In that case
>> it's just absurd.  You can't add stuff to the body of a PUT.  The body
>> *is* the PUT.  You could add it to a header.  But you can only do that
>> in an XHR request.
> 
> Huh? I'm saying, that the way the form_tag handler in WebHelpers works, 
> is if you do:
> h.form_tag('/some/url/to/send', method='put')
> 
> It makes a form tag with the normal POST method, but adds in a hidden 
> field called _method='PUT', that when Routes sees it in the Routes 
> Middleware, modifies the REQUEST_METHOD so that it appears as if it was 
> a PUT, and everything you had that assumed it would be a PUT works just 
> fine even though browers can't PUT. If you're doing a real PUT, there's 
> no need to add _method='PUT'... its already a PUT.
> 
> What are you talking about?

I still don't get what you are doing.  I'm talking about HTTP.  Here's 
what a sensible RESTful interaction looks like:

GET /some/resource -> response:
200 OK
Content-Type: application/xml

<xml>some doc</xml>


Given that, to update with PUT you do:

PUT /some/resource
Content-Type: application/xml

<xml>updated version of doc</xml>


What kinds of HTTP requests are you talking about?

   Ian

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to