首页 > 代码库 > curl终端请求json

curl终端请求json

curl -b ‘uin=o123456789; skey=@tq9xjRvYy‘ -H "Content-Type: application/json" -X POST -d ‘param={"key0":{"method":"add_money_for_qq_login","module":"pgg_bank_mt_svr","param":{"billno":"fdagdg1f2d5gd4","money":1,"remark":"","custom":"act_id%3D143838","sig":{"biz_key":"ams","h":"2939aadefcbaba0956f8b860abdaa558d1bacacf","ts":1479097419}}}}‘ http://10.50.124.37:80/cgi-bin/pgg_comm_async_fcgi

 -b是设置cookie参数 -H指定支持数据的格式

curl -H "Content-Type: application/json" -X POST -d ‘param={"testkey1":{"module":"pgg_user_watch_time_mt_svr","method":"get_user_watch_time","param":{"tt":"1","qqver":"4.4.2","net":"wifi","id":11,"uid":842493048,"source":1,"appid":"1104588283","anchor_id":1,"time":1482832414}}}‘ http://10.62.180.90:60060/cgi-bin/pgg_team_async_fcgi

 

请求url:http://10.62.180.90:60060/cgi-bin/pgg_team_async_fcgi?param={"key0":{"method":"add_money_for_qq_login","module":"pgg_bank_mt_svr","param":{"billno":"fdagdg1f2d5gd4","money":1,"remark":"","custom":"act_id%3D143838","sig":{"biz_key":"ams","h":"2939aadefcbaba0956f8b860abdaa558d1bacacf","ts":1479097419}}}}

curl终端请求json