0
我有一个服务器,需要一个POST请求和数据流的答案。我在URL
上看到过,我可以打开一个连接或一个流。甲流,但是,有写出来的数据没有方法:发送POST和阅读流式响应
URL url = new URL("...");
url.openConnection(); //either I open a connection which has a output stream, but no input
url.openStream(); //or I open a stream, but I cannot write anything out
我怎样才能完美地解决这个问题呢?
漂亮很好的解释来看看详细解释一下:http://stackoverflow.com/questions/2793150/using-java-net-urlconnection-to-fire-并处理http请求 – GPI