Sorry to come back to this after two weeks (was busy with other stuff). I 
am trying to access the post_vars, but they are emtpy (Storage {})
My PUT request body is coming from an emberjs client, and looks like this 
(this is just test data):

{"node":{"type":"voicemenu","name":"sdfsfd","outputs":{"jumpIfBusy":null,"startnode":null,"jumpIfNoAnswer":null,"exten":null},"properties":{"record":null,"multilocator":null,"locator":null}}}

But this data is not in post_vars. I do not understand very well what you 
mean by:

"basically request.post_vars are the variables in body whether it is PUT or 
POST or other."

I do not have "variables in the body", I have json data. This should be 
parsed as json. Should I do it manually, or is @request.restful() doing 
that automatically? (I can not see it in the code).

Thanks,
Daniel

On Friday, March 22, 2013 6:02:32 AM UTC+1, Massimo Di Pierro wrote:
>
> if request.env.request_method=='POST':
>     put_vars = request.post_vars
>
> basically request.post_vars are the variables in body whether it is PUT 
> or POST or other.
>
>
>
> On Thursday, 21 March 2013 19:10:27 UTC-5, Daniel Gonzalez wrote:
>>
>> Hi,
>>
>> How can I access the data in the PUT request? (in the body of the request)
>> Can this be automatically parsed (my data is JSON)
>>
>> Thanks,
>> Daniel
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to