shazaman23 / webapp-improved

Automatically exported from code.google.com/p/webapp-improved
Other
0 stars 0 forks source link

webob ignores parameters for put/delete #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The current version of WebOb found in App Engine ignores form parameters for 
non GET/POST requests, which is really inconvenient for RESTfull apps.

I hope that a newer version does ship in the same release as 2.7 (that also 
includes this framework AFAIK), but for the time being, I was tired on doing 
workarounds so I made a really really simple override in webapp2 to handle this 
issue:

@property
def str_POST(self):
    method = self.method
    self.method = 'POST'
    vars = super(Request, self).str_POST
    self.method = method
    return vars

Very straightforward. Yes, it's a hack, but I think it gives the behavior 
people expect.

Anyway, thought you might be interested. And of course, thank you for all the 
amazing job you've done :)

Original issue reported on code.google.com by jaime.go...@gmail.com on 5 Sep 2011 at 5:21

GoogleCodeExporter commented 8 years ago
In webOb lib version 0.9.3 PUT params are supported in request.POST dict with 
request Content Type 'application/x-www-form-urlencoded' or 
'multipart/form-data'.

Try to replace webOb lib version in SDK 1.6.0: today is 0.9. AppEngine 
documentation says thah webOb lib version supported is 1.1.1. I think that in 
production it should work.

Original comment by carlos.e...@gmail.com on 15 Nov 2011 at 11:33

GoogleCodeExporter commented 8 years ago
Yes, this is no longer an issue with the new SDK :D

Original comment by jaime.go...@gmail.com on 16 Nov 2011 at 12:19

GoogleCodeExporter commented 8 years ago
I'm going to mark this as fixed since it works with the Python 2.7 runtime.

Original comment by bquin...@google.com on 5 Dec 2011 at 11:28