def index(): def generate(): yield 'Hello ' yield keyes.request.args['name'] yield '!' return keyes.Response(keyes.stream_with_context(generate()))
def index(): @keyes.stream_with_context def generate(hello): yield hello yield keyes.request.args['name'] yield '!' return keyes.Response(generate('Hello '))
def head(self): return keyes.Response('', headers={'X-Method': 'HEAD'})
def get(self): return keyes.Response('Blub', headers={'X-Method': keyes.request.method})