> --
> You received this message because you are subscribed to the Google Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
>
> it appears that
>
> from simplejson import loads
> kw = loads(request.body)
>
> works.
>
> however, i believe that this should just work as if it were a normal
> POST request, no?
No, I don't think so. One could argue that this should be the case, but AFAIK there is no machinery in TG that does this for you.
Diez
@expose()
def puttest(self, **kw):
print request.method, kw
outputs:
PUT {'name': u'John', 'location': u'Boston'}
I'm calling the puttest method using jQuery.ajax({'type':'PUT'}) and
the browser reports to be correctly using a PUT request.
Might have I missed something?
Which version of TG and WebOb are you using? With WebOb 1.0.8 the PUT
parameters end in request.params and so TG is able to use them to
dispatch the request. I didn't try with other versions.
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/turbogears/-/BgpZGGdLSs4J.