//智能机器人路径
public class ConstantConf {
public static final String ROBOT_PATH=“http://api.qingyunke.com/api.php”;
public static final String ACCOUNTSID = “0374867b2c1844dbbe0bf019bf0def28”;
}
后台
//机器人
public String sendRobot(String msg){
//String url = CommonCanstant.SEND_MSG_ROBOT;
HashMap<String, Object> params = new HashMap<>();
params.put("key", "free");
params.put("appid", "0");
String encode = "";
try {
encode = URLEncoder.encode(msg, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
params.put("msg", encode);
String respData = HttpClientUtil.get(ConstantConf.ROBOT_PATH, params );
JSONObject parseObject = JSON.parseObject(respData);
String result = parseObject.getString("result");
if(&#