任何人都可以告訴我什麼是下面的代碼的概率?如何將參數從android應用程序傳遞到服務器
outputStream.writeBytes(twoHyphens + boundary + lineEnd);
outputStream.writeBytes("Content-Disposition: form-data; name=\"key\"" + lineEnd);
outputStream.writeBytes(lineEnd);
outputStream.writeBytes("test");
outputStream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
你應該給我們介紹一下您的問題更多的信息添加
outputStream.flush()
。有沒有例外?或者還有其他問題嗎? – PKeidel我沒有得到這個。我有代碼上傳,它工作正常,但我需要知道如何發送參數 檢查此提示鏈接 - > (http://stackoverflow.com/questions/8900337/httpurlconnection-how-to-sending-參數通過郵政/ 12771165#12771165) –