Linux 下 发送 json 数据包到服务器

应用层:HTTP 协议
工具:curl

curl 202.107.200.190:8091 -X POST -H "Content-Type:application/json" -d '{"name":"request","project_id":"LSD5IM0761-01D0","dev_type":"std","custom_id":"0001","version":"1009","build_date":"20191030"}'

传输层:TCP协议
工具:nc

root@jason:~# nc 202.107.200.190 8090
{"build_date":"20191126","version":"031.01.01","custom_id":"0726","dev_type":"nonstd","project_id":"LSD5IM0048-10D0","name":"request"}
{"name":"ack","is_latest":"no","project_id":"LSD5IM0048-10D0","dev_type":"nonstd","custom_id":"0726","version":"031.01.03","pkg_type":"full","build_date":"20191126","update_type":"manual","md5":"d41d8cd98f00b204e9800998ecf8427e","pkg_url":"http://202.107.200.190:8040/ota/LSD5IM0048-10D0/0726/update_031.01.03.zip"}

你可能感兴趣的:(Linux)