通过flask的request对象获取url


测试了一下:通过发送 GET 到 http://127.0.0.1:5000/test/a?x=1,

后台输出为(官网说明):

1 request.path: /test/a
2 request.host: 127.0.0.1:5000
3 request.host_url: http://127.0.0.1:5000/
4 request.full_path: /test/a?x=1
5 request.script_root: 
6 request.url: http://127.0.0.1:5000/test/a?x=1
7 request.base_url: http://127.0.0.1:5000/test/a
8 request.url_root: http://127.0.0.1:5000/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM