CURL POST 请求
curl -H "Content-Type: application/json" -X POST --data '{"data":"1"}' http://127.0.0.1/
php中 curl模拟post发送json并接收json
curl_setopt($curl, CURLOPT_HTTPHEADER,
array(
'Content-Type: application/json; charset=utf-8',
'Content-Length:' . strlen($data))
);