1、使用HttpURLConnection调用url
public static String postJson(String callbackUrl, Map params, int connectTimeout, int readTimeout) {
String result = "";
HttpURLConnection httpURLConnection = null;
BufferedReader reader = null;
String json = JSON.toJSONString(params);
try {
URL url = new URL(callbackUrl);
httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setUseCaches(false);
httpURLConnection.setConnectTimeout(connectTimeout);
httpURLConnection.setReadTimeout(readTimeout);
httpURLConnection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
httpURLConnection.connect();
OutputStream os = httpURLConnection