Example #1
0
File: app.py Project: pyrates/roll
async def full(request, one, two):
    response = Response.json({
        'parameters': f'{one} and {two}',
        'query': request.query.get('query'),
        'cookie': request.cookies['test'],
    })
    response.cookies.set(name='bench', value='value')
    return response
Example #2
0
File: app.py Project: pyrates/roll
async def minimal(request):
    response = Response.json({'message': 'Hello, World!'})
    return response
Example #3
0
File: app.py Project: pyrates/roll
async def cookie(request):
    response = Response.json({'cookie': request.cookies['test']})
    response.cookies.set(name='bench', value='value')
    return response
Example #4
0
File: app.py Project: pyrates/roll
async def query(request):
    response = Response.json({'query': request.query.get('query')})
    return response
Example #5
0
File: app.py Project: pyrates/roll
async def parameter(request, parameter):
    response.json = Response.json({'parameter': parameter})