This commit is contained in:
2018-10-14 08:17:17 -04:00
parent 13d84f73d4
commit e86f2f3873
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -112,8 +112,8 @@ Here, we'll process our data in the background, while responding immediately to
# Parse the incoming data as form-encoded.
# Note: 'json' and 'yaml' formats are also supported.
data = await resp.media('form')
# Note: 'json' and 'yaml' formats are also automatically supported.
data = await resp.media()
# Process the data (in the background).
process_data(data)
+1
View File
@@ -191,6 +191,7 @@ class Request:
if format is None:
format = "yaml" if "yaml" in self.mimetype or "" else "json"
format = "form" if "form" in self.mimetype or "" else format
if format in self.formats:
return self.formats[format](self)