测试了一下:通过发送 GET 到 http://127.0.0.1:5000/test/a?x=1,
后台输出为(官网说明):
1 request.path: /test/a2 request.host: 127.0.0.1:50003 request.host_url: http://127.0.0.1:5000/4 request.full_path: /test/a?x=15 request.script_root: 6 request.url: http://127.0.0.1:5000/test/a?x=17 request.base_url: http://127.0.0.1:5000/test/a8 request.url_root: http://127.0.0.1:5000/
通过flask的request对象获取url
原文地址:https://www.cnblogs.com/lyg-blog/p/10049086.html