Flask 简明教程
Flask – Request Object
客户网页中的数据以全局请求对象的形式发送到服务器。为了处理请求数据,应从 Flask 模块导入它。
The data from a client’s web page is sent to the server as a global request object. In order to process the request data, it should be imported from the Flask module.
请求对象的重要属性如下列出:
Important attributes of request object are listed below −
-
Form − It is a dictionary object containing key and value pairs of form parameters and their values.
-
args − parsed contents of query string which is part of URL after question mark (?).
-
Cookies − dictionary object holding Cookie names and values.
-
files − data pertaining to uploaded file.
-
method − current request method.