【发布时间】:2019-05-24 03:46:47
【问题描述】:
我正在使用 centos 7 并且有这个 json 请求:
curl --output 'json.data.json' -vvv -x '' -X POST -H "Content-Type: application/json" -H "Connection: keep-alive" -d '{"jsonrpc":"2.0","method":"item.get","params":{"output": ["name","lastvalue","lastclock","hostid"],"groupids": ["5"],"filter":{"name":["LDT Security Flag"]},"sortfield": "name" },"auth":"c1cxxxxxxxxx","id":1}' $CURLADDR
现在, 在我看到的结果中间:
734247","lastvalue":"0"},{"itemid":"192890","name":"LDT Fl* transfer closed with outstanding read data remaining
100 86797 0 86569 100 228 75094 197 0:00:01 0:00:01 --:--:-- 75146
* Closing connection 0
curl: (18) transfer closed with outstanding read data remaining
然后还有一些 json 结果。 但我注意到,无论我运行它多少次并将输出重定向到 .json 文件,文件总是以相同的大小:88K 就像信息下载大小有某种限制?我该怎么办?
更新:
所以我添加了它,现在错误:curl: (18) 传输已关闭,剩余未完成的读取数据消失了。但仍然在中间切开:* Closing Connection 0,文件为 88K – Batchen Regev 11 分钟前
还有连接数据:
> POST /api_jsonrpc.php HTTP/1.0
> User-Agent: curl/7.29.0
> Host: XXXXXX:1080
> Content-Type: application/json;charset=utf-8
> Accept: application/json, text/plain, */*
> Content-Length: 224
>
} [data not shown]
* upload completely sent off: 224 out of 224 bytes
100 224 0 0 100 224 0 223 0:00:01 0:00:01 --:--:-- 223< HTTP/1.1 200 OK
< Server: nginx
< Date: Tue, 25 Dec 2018 15:21:07 GMT
< Content-Type: application/json
< Connection: close
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Content-Type
< Access-Control-Allow-Methods: POST
< Access-Control-Max-Age: 1000
<
{ [data not shown]
100 86840 0 86616 100 224 77583 200 0:00:01 0:00:01 --:--:-- 77612
* Closing connection 0
【问题讨论】: