Brad Clements wrote:
> Ian Bicking wrote:
>> Brad Clements wrote:
> 
>>> I receive a REST POST to a resource and I want to return it. I use 
>>> DataApp to do that, but now it doesn't work!
>>>
>>> Why can't POST requests return data?
>>>
>>> Do I have to subclass DataApp, or modify all my code to alter 
>>> environ[REQUEST_METHOD] before returning a DataApp object?
>> Sorry about the slow response.  It was noted as a backward incompatible 
>> change in 1.2.  Generally DataApp and POST don't really fit together -- 
>> conceptually they are different.  
> 
> I'm afraid I don't see how POST has anything to do with DataApp.
> 
> Isn't DataApp just a handy object for returning a blob of data?
> 
> Can't any method can return data, not just GET?
> 
> I'm afraid I just don't see the logic, I must be missing something.

DataApp really represents a resource.  That's why it has an ETag, 
handles ranges, Last-Modified, etc.  A blog of data doesn't have an 
identity like that.  Something like Range support or 304 Not Modified is 
never an appropriate response to a POST -- POST responses are naturally 
transitory, and actually are expected to invalidate the resources 
themselves.

-- 
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to