2011-11-16 32 views

Trả lời

2

Đây là cách bạn nhận được mã đáp ứng nếu bạn đang sử dụng HttpUrlConnection:

int status = ((HttpURLConnection) connection).getResponseCode(); 
Log.i("", "Status : " + status); 

Và đây là nếu bạn đang sử dụng HttpClient:

HttpResponse response = httpclient.execute(httppost); 
Log.w("Response ","Status line : "+ response.getStatusLine().toString()); 
Các vấn đề liên quan