我正在尋找教程或快速的例子,我怎麼可以發送POST數據扔openStream。如何通過url.openStream()發送POST數據?
我的代碼是:
URL url = new URL("http://localhost:8080/test");
InputStream response = url.openStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(response, "UTF-8"));
你能幫助我嗎?
可能重複[發送HTTP POST請求在Java](http://stackoverflow.com/questions/3324717/sending-http-post- request-in-java) – 2012-01-10 14:10:00