Some of the properties of the Request and Response objects are metadata, some are parsed, and others are just links.
Request
methodStart Row, metadata
hostStart Row, metadata
pathStart Row, metadata
environWhere SERVER_PROTOCOL is the starting row, the meta-data
headersheader, Meta data
dataBody, meta data
remote_addrClient Address
argsParameters in the request link (GET parameters), after parsing
formParameters in form submission, after parsing
valuesThe collection of args and forms
jsonBody data in JSON format, after parsing
cookiesLinks to Cookies
The Request object classifies the parameters very fine, note args , form , valeus and json the difference. Of course the most insurance and the most primitive way is to resolve themselves data .
Another area to be aware of is the type of some attributes, not the Python standard dict , but multidict or combinedmultidict. This is to deal with the setting that the parameters in the HTTP protocol are repeatable. So pay attention to the properties of these objects, such as the .get() .get_list() things returned by the method.
Response
statusStatus code, meta data
status_codeContains only the status of code
headersheader, Meta data
mimetypeRemove the content type of charset, such asapplication/json
dataBody, meta data
Flask's request and response objects