public class Test{
private static String uri=""; //接口路径
private static String codiInfoUrl = "http://localhost:8080/"+uri;
public static void main(String[] args) {
testCodeInfo();
}
public static void testCodeInfo() {
String path="D:/测试JSON";
String jsonPath = path+ "/测试.json"; //报文/文件存放路径
String reqStr = IOUtil.readStringFromFile(new File(jsonPath),"utf-8");
String result = HttpUtil.post(codiInfoUrl, reqStr);
System.out.println(result);
}
}