Added tests and middleware, and improved documentation

This commit is contained in:
Channel Cat
2016-10-14 03:23:48 -07:00
parent 8b1b69eadc
commit a74ab9bd18
20 changed files with 589 additions and 44 deletions

View File

@@ -14,4 +14,8 @@ app = Sanic("test")
async def test(request):
return json({ "test": True })
app.run(host="0.0.0.0", port=sys.argv[1])
@app.route("/file")
async def test(request):
return json({ "test": True, "files": request.files, "fields": request.form })
app.run(host="0.0.0.0", port=sys.argv[1], debug=True)