1. get请求 curl url?参数 2. post请求 curl -d "参数" url 3. session cookie保存问题 如需要用户登录后,才能访问其它接口: (1)访问登录接口,把产生的cookie保存在fee.cookie文件里 curl -d "user=test&pass=111111" -D test.cookie (2)登录成功后,访问别的接口,只需读取上一步产生的session cookie即test.cookie文件。 curl -d "http://192.168.252.4/user/network/connect_action.jsp?ip=192.168.1.1&type=2" -b test.cookie 注意事项 1:参数一定要加引号,否则传递多个参数时会出问题。