flask-restful 框架流程设计
2020-12-07 本文已影响0人
木语沉心
Flask从请求到响应的流程:
客户端-----> wsgi server ----> 通过call调用 wsgi_app, 生成requests对象和上下文环境------> full_dispatch_request功能 ---->通过 dispatch_requests进行url到view function的逻辑转发, 并取得返回值 ------> 通过make_response函数,将一个view_function的返回值转换成一个response_class对象------->通过向response对象传入environ和start_response参数, 将最终响应返回给服务器.


