Python中通过POST请求获取服务器返回JSON的问题
调试Python获取服务器JSON数据的curl测试记录
最近我在编写Python代码,目标是从服务器获取JSON数据。为了先验证接口是否正常,我用curl发起了POST请求做测试。另外我的Java服务端代码应该能正确生成JSON响应,下面是我用到的curl命令和执行到一半的输出结果:
测试用的curl命令
$ curl -u trial:trial -H "Content-Type: application/json" -X POST -d '{"BP_TSM":"22"}' http://some-host --trace-ascii -
curl命令的执行输出
== Info: About to connect() to localhost port 8080 (#0)
== Info: Trying ::1...
== Info: Connected to localhost (::1) port 8080 (#0)
== Info: Server auth using Bas...
内容的提问来源于stack exchange,提问作者menteith
相关产品推荐
相关产品推荐

