项目需要定期与远程服务器同步数据,基于如下代码: URL url = new URL("http://test.com/sales/info"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setUseCaches(false);
项目需要定期与远程服务器同步数据,基于如下代码: URL url = new URL("http://test.com/sales/info"); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setUseCaches(false);