日期:2014-05-20  浏览次数:20615 次

java模拟论坛发帖~getInputStream()取数据为空怎么回事?
HttpURLConnection 方式模拟论坛发帖~帖子发表成功了~用BufferedReader每次读取getInputStream()读取数据为空怎么回事?

------解决方案--------------------
请求可能是post或者是get方式,是不是方式错了?
http://blog.csdn.net/pandazxx/article/details/1657109
------解决方案--------------------

HttpURLConnection conn = createConnection(url, props, proxy);
OutputStream out = new BufferedOutputStream(conn.getOutputStream());
out.write(paserParams(params).getBytes());
out.flush();
out.close();

return conn;


这是post方法,但是你应该用get吧