url(r'^test555/$', newview.test555),
def test555(req):
query_param = request.query_params
print query_param
import requests
res = requests.post("http://192.168.137.3:9000/test555?a='111'&b='222'/", data={'a':3, 'b':4})
print(res.text)
def test555(req):
print '11111111111111'
print req.get_full_path()
print '222222222'
b= req.body
print b
print type(b)
print '333333333'
a= req.POST.get('a', 0)
b= req.POST.get('b', 0)
print a
print b
return HttpResponse(str('aaa'))
July 14, 2020 - 17:45:13
Django version 1.11.9, using settings 'mysite.settings'
Starting development server at h
python post body
最新推荐文章于 2024-08-15 18:36:28 发布
本文详细介绍了如何使用Python进行HTTP POST请求,包括设置请求头、发送JSON或表单数据、处理响应等内容,适合初学者和进阶者参考。
摘要由CSDN通过智能技术生成