blob: 411a4587bcedd43b65db9b5403867266c1011af4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
def main(request, response):
key = request.GET.first(b"id")
if request.method == "POST":
value = request.GET.first(b"value")
request.server.stash.take(key)
request.server.stash.put(key, value)
return b"OK"
else:
value = request.server.stash.take(key)
if value is not None:
return value
else:
return b"NONE"
|