#自行构造response消息 两种方法
构造response消息返回
headers = {
'content-type':"text/html",
# 'location':'http://www.baidu.com'
}
response = make_response("hello world",200)
response.headers = headers
直接return响应消息
return 'hello world',200,headers
# 使用基于类的视图时用下面这种路由注册方法
# app.add_url_rule('/hello/',view_func=hello)
#flask路由图示(图1)
图1
#Flask循环导入流程图(图2)
图2