?请教:十万火急使用java.net中httpURLConnection类模拟post方法
由于httpString的参数很多,大约有8000个,因而有URL TOO LONG的例外,
有方法解决,请给出正确的POST方法
httpString= "........"; //参数很多
URL cgi_link = new URL(WebProtocol,WebHost,WebPort,httpString)
this.urlConnection = url.openConnection();
urlConnection.setDoOutput(true);
urlConnection.setDoInput(true);
urlConnection.setAllowUserInteraction(false);
DataOutputStream server = new DataOutputStream urlConnection.getOutputStream()); server.writeBytes(httpString);
server.close();