具体见flaskDemo2
request 的成员(常用)
1.request.scheme : 获取请求方案(协议)
2.request.method : 获取本次请求的请求方式
3.request.args : 获取使用GET请求方式提交的数据
4.request.form : 获取使用POST请求方式提交的数据
5.reque.values : 获取GET和POST方式提交的数据
6.request.cookies : 获取cookies中的信息
7.request.headers : 获取请求消息头的消息
headers : Host: 127.0.0.1:5556 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3 Referer: http://127.0.0.1:5556/ Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
headers.Host : 127.0.0.1:5556
headers.Connection : keep-alive
headers.Cache-Control :
headers.Upgrade-Insecure-Requests : 1
headers.User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
headers.Accept : text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3
Referer : http://127.0.0.1:5556/
headers. Accept-Encoding :
scheme : http
method : GET
args : ImmutableMultiDict([])
from : ImmutableMultiDict([])
values : <built-in method values of dict object at 0x064262D0>
cookies : {}
path : /requests
full_path : /requests?
url : http://127.0.0.1:5556/requests
files : ImmutableMultiDict([])