赞
踩
try { URL url = new URL("http://example.com/"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST");
- // 将参数转换为字节数组
- String params = "param1=value1¶m2=value2";
- byte[] postData = params.getBytes(StandardCharsets.UTF_
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。