On Sat, 20 Jul 2013 14:30:46 GMT, Jack Applegame wrote:
I am writting a class for storing user related data. Is there a way to read/write data from/to "request context"?
For example:(...)
There is the HTTPServerRequest.params
map, which is supposed to be used in situations like these. It currently is just a string[string]
map, though. I've been thinking about making it Variant[string]
instead, but I need to look into how to do this without breaking existing code first.
Also has vibe.d some API for read/write data from/to Task/Fiber Local Storage?
Yes, there is vibe.core.core.setTaskLocal
and vibe.core.core.getTaskLocal
which stores arbitrary data in a per-task Variant[string}
map. This should be usable as a workaround for now.