| | |
| | | * @throws Exception |
| | | */ |
| | | @SuppressWarnings("resource") |
| | | public static SH2023RespDto postPushData(String url, SH2023ReqDto reqData , ApiConfs apiConfs) throws Exception { |
| | | log.info("---------接口请求地址:" +url+ "----------参数:" + reqData.toString() +"---------"); |
| | | public static SH2023RespDto postPushData(String url, String reqData , ApiConfs apiConfs) throws Exception { |
| | | log.info("---------接口请求地址:" +url+ "----------参数:" + reqData +"---------"); |
| | | BufferedReader in = null; |
| | | URL urls = new URL(url); |
| | | HttpURLConnection connection = null; |
| | |
| | | connection.setRequestMethod("POST"); |
| | | |
| | | outputStream = connection.getOutputStream(); |
| | | outputStream.write(reqData.toString().getBytes("UTF-8")); |
| | | |
| | | outputStream.write(reqData.getBytes("UTF-8")); |
| | | try { |
| | | connection.connect(); |
| | | if (connection.getResponseCode() == 200) { |