예제 #1
0
        def index():
            def generate():
                yield 'Hello '
                yield keyes.request.args['name']
                yield '!'

            return keyes.Response(keyes.stream_with_context(generate()))
예제 #2
0
        def index():
            @keyes.stream_with_context
            def generate(hello):
                yield hello
                yield keyes.request.args['name']
                yield '!'

            return keyes.Response(generate('Hello '))
예제 #3
0
 def head(self):
     return keyes.Response('', headers={'X-Method': 'HEAD'})
예제 #4
0
 def get(self):
     return keyes.Response('Blub',
                           headers={'X-Method': keyes.request.method})