postman post请求 发送form表单数据/发送json数据
·
使用postman 发送post请求 form表单数据填写位置:

后端代码:
def post(self, request):
jip_port = request.POST.get('ip_port')
juname = request.POST.get('uname')
jpswd = request.POST.get('pswd')
result = {"status": 200, "msg": "登录成功"}
return HttpResponse(json.dumps(result), content_type="application/json,charset=utf-8")
使用postman 发送post请求 json数据填写位置:

后端代码:
def post(self, request):
res = request.body.decode('utf-8')
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐

所有评论(0)