curl -i -X POST -H "'Content-type':'application/json'" -d '{"userName": "xxx","sql": "select * from dp_tmp.test_table ","etl_jobid": "1","db_name": "dp_temp","table_name": "test_table"}' http://10.xx.14.34:8282/api/etl_min_task/getBeelineInfo1/
执行上面的命令报错:
HTTP/1.1 415 Unsupported Media Type
Content-Length: 0
Server: Jetty(8.2.0.v20160908)
下面的命令执行正常:
curl http://10.xx.14.34:8282/api/etl_min_task/getBeelineInfo1/ -H "Accept: application/json" -H "Content-Type: application/json" -d '{"userName": "xx","sql": "select * from dp_tmp.test_table ","etl_jobid": "1","db_name": "dp_temp","table_name": "test_table"}'