2.1.3 得到webhook的url
2.2代码demo
String robotHookAddr = "https://oapi.dingtalk.com/robot/send?access_token= 8df13f2e3fc211b7c9237ad08f98e9019660276da19c816f4c0c8a6xxxxx";
String contentJson = "{ \"msgtype\": \"text\", \"text\": {\"content\": \"" "alerthhhhhhhhhhh" "\"}}";
String result = HttpClientUtil.doPostJson(robotHookAddr, contentJson);
注意:
1. access_token就是Webhook,直接拷贝过来就能用
2. contentJson内容格式固定,不要变更
3. contentJson中的content,必须以“关键字”开头。
,