On Wednesday, May 21, 2014 6:35:31 AM UTC-7, marco mansilla wrote: > > El Tue, 20 May 2014 15:27:29 -0700 (PDT) > Cory <[email protected] <javascript:>> escribió: > > > Hi, > > I am trying to access the contents of a post request made to a url on > > my website. > > To test this I have been trying to send post requests to a url on my > > website to see I if am able to get the data from the post. > > Does anyone know how I can access the post data? am I accessing it > > correctly by using "request.vars"? > > thanks! > > > > def post_sender(): > > requests.post(url,data) > > > > def post_receiver(): > > if request.vars: > > do stuff with data > > > > > > > > something like: > > def post_sender(): > redirect(URL('youController','post_receiver', > vars=dict(myvar="someValue"))) > > return dict() > > def post_receiver(): > if request.vars.myvar: > do stuff with data > > that's pretty much it. > > Marco. >
thanks for the response, I have tried to do the above code, but I am unable to access or view the data from the post request. I think this is because every time I reload the receiving url to see if I can post the data to the view it starts a new session? and gets rid of the post variables that it received? Does anyone know how I can view the data using the above pseudo code -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.

