HttpClient client = new DefaultHttpClient();
String data = "valid SOAP REquest";
HttpPost httpPost = new HttpPost(「valid url」); Log.d(「inside」,「創建的http post」); 嘗試ByteArrayInputStream baos = new ByteArrayInputStream(data.getBytes());Android:HTTP Post文章
Log.d("inside", "firing request...");
HttpResponse httpResponse = client.execute(httpPost);
Log.d("inside", "request sent" + httpResponse.getStatusLine().getStatusCode());
一直以來,我得到的狀態代碼爲405。我想請求隊列以及.. sneding字節數組作爲請求隊列,還是同樣的問題的一部分。
我回答了你的問題嗎? – 2010-05-03 13:01:30
你必須設置什麼內容類型? – rpcutts 2011-03-30 14:23:21