繁体   English   中英

如何使用python请求发送不带参数的post类型请求

[英]how to send post type request without parameter using python requests

我在 swagger“登录”上有接受此 json 的方法:

{ "login": "string", "password": "string", "supplierId": 0 }

我需要使用 Python 中的请求模块发送请求:

1)首先没有登录属性

{"login": , "password": "user_password", "supplierId": "user_supplierId"}

2) 有登录属性但没有括号

{"login": asd, "password": "user_password", "supplierId": "user_supplierId"}

有人能帮我吗?

由于您有接受 json 的方法:{ "login": "string", "password": "string", "supplierId": 0 }。

您可能必须将字符串作为值发送到登录变量。 如果您不想发送登录值,可以尝试传递一个空字符串""

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM