Befor我使用直接管理面板, 現在我改變了cpanel; 那麼,現在我的問題是我不能用post方法發送任何數據到這個主機; 從HTML表單工作正常!但android不工作! 任何菩提可以幫助我解決這個問題Android不能發送數據到服務器
獲取方法工作正常,但我必須使用post方法。 必需的參數: 電子郵件 通 名 家庭
它會顯示成功,如果當期的! 如果顯示存在它不起作用。
Befor我使用直接管理面板, 現在我改變了cpanel; 那麼,現在我的問題是我不能用post方法發送任何數據到這個主機; 從HTML表單工作正常!但android不工作! 任何菩提可以幫助我解決這個問題Android不能發送數據到服務器
獲取方法工作正常,但我必須使用post方法。 必需的參數: 電子郵件 通 名 家庭
它會顯示成功,如果當期的! 如果顯示存在它不起作用。
,你可以這樣做:
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
try {
urlConnection.setDoOutput(true);
urlConnection.setChunkedStreamingMode(0);
OutputStream out = new BufferedOutputStream(urlConnection.getOutputStream());
writeStream(out);
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
readStream(in);
finally {
urlConnection.disconnect();
}
}
我編輯了我的帖子;你能改變這個給我一個字符串結果嗎? – user5137770
我編輯我的問題PLZ閱讀 – user5137770
你嘗試過這麼遠嗎? –
我用json解析器 – user5137770
你得到了什麼錯誤?發佈您的代碼 –