On Sunday, October 2, 2016 at 11:26:11 PM UTC-4, 
luis.vallada...@metamaxzone.com wrote:
>
> The second sounds good to me, but i dont know really where to store it, my 
> front end is REST and has no database connected to it, all the info i get 
> its from microservices, so i need some sort of variable or environment 
> space where to store the token when i receive it and retrieve it in the 
> case of an error, there is anything like that in web2py?
>

Well, the error handler receives request.env.request_uri via the 
requested_uri query string parameter, so you might be able to do something 
like:

    request.env.request_uri += '&token=%s' % token

Then in the error handler, you would have to parse request.vars.request_uri 
to extract the token.

Alternatively, this might work:

    request.wsgi.environ['token'] = token

Note, I haven't tried either of the above, so not sure if they will work.

Anthony

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to