有时候java服务连接异常,为了检查网络等情况,会在服务器上做连接测试,这时候可以使用curl连接,来进行检测。
请求:
curl -d '{"page_size":10,"page_index":1,"condition":{"ent_name":"","year":"","completion_status":""}}' -H 'Authorization: Bearer xxxxx' -H 'Content-Type: application/json' https://wb.gxj.sz.gov.cn/szjnzx/api/v3/emmeterservice/list
响应:
{"data":
{
"list":[{"id":15503,"ent_id":2637,"ent_name":"xxx有限公司","meter_name":"A1T221M","meter_sys_code":"3444442198312"}],
"total":56
},
"code":0,
"msg":"ok"
}