Android HttpResponse response code

I am trying to get the response code for HttpReponse. There is no way to get the response code directly.

+5
source share
3 answers
+20
source

Find the Android link : how to get the status code of an HttpClient request

Hope this helps you.

Hi,

Android Geek.

+2
source

, HttpUrlConnection:

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

HttpClient:

HttpResponse response = httpclient.execute(httppost);
Log.w("Response ","Status line : "+ response.getStatusLine().toString());
+2

All Articles