#自行構(gòu)造response消息? 兩種方法
構(gòu)造response消息返回
? ? headers = {
'content-type':"text/html",
? ? ? ? # 'location':'http://www.baidu.com'
? ? }
response = make_response("hello world",200)
response.headers = headers
直接return響應(yīng)消息
? ? return? 'hello world',200,headers
# 使用基于類的視圖時用下面這種路由注冊方法
# app.add_url_rule('/hello/',view_func=hello)
#flask路由圖示(圖1)

圖1
#Flask循環(huán)導(dǎo)入流程圖(圖2)

圖2