一、客户端请求
public static String test(){ JSONObject obj = new JSONObject(); obj.put("cusName","禹州林业集团"); obj.put("socialCreditCode","11431000006542054G"); String parm = obj.toString(); String result = "";//BASE64加密的返回结果 String res = "";//解密后的字符串 PrintWriter out = null; BufferedReader in = null; try { java.net.URL realUrl; realUrl = new URL("http://127.0.0.1:9998/test/c/getC"); HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection(); conn.setRequestMethod("POST"); // 设置通用的请求属性 conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setRequestProperty("Content-Type", "