flask 获取request信息

2019-07-07 15:16:53 浏览数 (1)

from flask import Flask from flask import request

app = Flask(name)

@app.route('/') def getrequest(): useragent=request.headers.get("User-Agent") return useragent

if name == 'main': app.run()

0 人点赞