80,351
社区成员
发帖
与我相关
我的任务
分享
HttpURLConnection hc=(HttpURLConnection) (new URL(localhost)).openConnection();
hc.setRequestMethod("POST");
hc.setRequestProperty("Content-Length", data.length()+"");
hc.setDoOutput(true);
OutputStream os=hc.getOutputStream();
os.write(data.getBytes());
java.net.ProtocolException: exceeded content-length limit of 47 bytes