From 9d3bb4a37ad2edcededc9c79108d1c5892de3f9a Mon Sep 17 00:00:00 2001 From: Shawn Niederriter Date: Thu, 6 Apr 2017 19:47:25 +0000 Subject: [PATCH] Updated examples in-line with response docs --- examples/aiohttp_example.py | 2 +- examples/redirect_example.py | 2 +- examples/run_async.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/aiohttp_example.py b/examples/aiohttp_example.py index f8043d5c..853ea959 100644 --- a/examples/aiohttp_example.py +++ b/examples/aiohttp_example.py @@ -10,7 +10,7 @@ async def fetch(session, url): Use session object to perform 'get' request on url """ async with session.get(url) as result: - return await result.text() + return await result.json() @app.route('/') diff --git a/examples/redirect_example.py b/examples/redirect_example.py index c062a76f..acc7d1ff 100644 --- a/examples/redirect_example.py +++ b/examples/redirect_example.py @@ -14,4 +14,4 @@ async def test(request): if __name__ == '__main__': - app.run(host="0.0.0.0", port=8080) \ No newline at end of file + app.run(host="0.0.0.0", port=8000) \ No newline at end of file diff --git a/examples/run_async.py b/examples/run_async.py index 1fb232c3..b6f6d76d 100644 --- a/examples/run_async.py +++ b/examples/run_async.py @@ -12,7 +12,7 @@ async def test(request): return response.json({"answer": "42"}) asyncio.set_event_loop(uvloop.new_event_loop()) -server = app.create_server(host="0.0.0.0", port=8080) +server = app.create_server(host="0.0.0.0", port=8000) loop = asyncio.get_event_loop() task = asyncio.ensure_future(server) signal(SIGINT, lambda s, f: loop.stop())