之前写过一篇使用飞鸽快信给自己的微信发送消息的示例。https://blog.csdn.net/xcxzzx01/article/details/80461086
两年多过去了,飞鸽快信已改名捷易快信,相关的接口也已升级,故重新写一篇博客,以方便广大网友。
1. 捷易快信网站地址 http://jy.erpit.cn/
2. 实现方式,依赖的jar包没变,只是接口参数变了。
代码如下:
package com.xxx.xxx;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameVal