美文网首页
request 获取path url

request 获取path url

作者: 叶田的学习笔记 | 来源:发表于2018-10-24 20:57 被阅读0次
    url http://wificdn.com:8888/wxpay/qrcode2/16122010404238801544?name=lzz
    
    request.get_host() # wificdn.com:8888
    request.get_full_path() # u'/wxpay/qrcode2/16122010404238801544?name=lzz'
    
    request.build_absolute_uri('/') # 'http://wificdn.com:8888/'
    request.build_absolute_uri('/hello') # 'http://wificdn.com:8888/hello'
    request.build_absolute_uri() # 'http://wificdn.com:8888/wxpay/qrcode2/16122010404238801544?name=lzz'
    
    request.path # u'/wxpay/qrcode2/16122010404238801544'
    request.scheme # 'http'
    

    相关文章

      网友评论

          本文标题:request 获取path url

          本文链接:https://www.haomeiwen.com/subject/ggqbzftx.html