HttpResponse response = mHttpClient.execute(mHttpGet);
if(response.getStatusLine().getStatusCode() == 201){
}
.....
I have different statuses and I need to handle all them to show later for appropriate status appropriate dialog message.
What is the better way of handling HTTP response statuses?
Another way is as follows:
Put these status codes and corresponding messages in a property file.
Your could do something like
staus_201= Message for status 201
When you receive a status, retrieve the corresponding message from the property files (see example )and display them.