$arg_PARAMETER #这个变量包含GET请求中,如果有变量PARAMETER时的值。
location /first {
#rewrite /first(.*) /second$1 break ;
root /var/www/html/;
return 200 $arg_username ;
}
node2:/root#curl http://192.168.137.2:2443/first?username=aaa
aaanode2:/root#curl http://192.168.137.2:2443/first?username=bbb
bbbnode2:/root#curl http://192.168.137.2:2443/first?username='xyz'
xyznode2:/root#
import requests
res = requests.get("http://192.168.137.2:2443/first?username=bbb")
print(res.text)
C:\Python27\python.exe C:/Users/TLCB/PycharmProjects/untitled2/http/post_param.py
C:\Python27\lib\site-packages\cryptography\hazmat\primitives\constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a release (2.7.7+) that supports hmac.compare_digest as soon as possible.
utils.PersistentlyDeprecated2018,
bbb
$arg_PARAMETER #这个变量包含请求中,如果有变量PARAMETER时的值。
最新推荐文章于 2024-03-02 16:51:42 发布