flask 返回response对象

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

from flask import Flask from flask import make_response

app = Flask(name)

@app.route('/') def index(): response=make_response('heheh') response.set_cookie('ansiser','42') return response

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

0 人点赞