I'm looking to get the multipart form data and turn it into a dictionary. Easy enough for json, but this seems to be a bit different.
Current code:
app = web.Application()
async def deploy(request):
# retrieve multipart form data or
# x-www-form-urlencoded data
# convert to a dictionary if not already
text = "Hello"
return web.Response(text=text)
app.router.add_post('/', deploy)
web.run_app(app)
You can use the request.post()
method.
app = web.Application()
async def deploy(request):
# retrieve multipart form data or
# x-www-form-urlencoded data
data = await request.post()
print(data)
text = "Hello"
return web.Response(text=text)
app.router.add_post('/', deploy)
web.run_app(app)