I\'m retrieving the content of a invalid web address with volley, i.e. http://www.gigd32fdsu.com:
This is my test code:
// Instantiate the Reque
I will make the response from VinceStyling more complete. I'll tell you what I do.
Once you override this method, save the statusCode in your class.
@Override
protected Response parseNetworkResponse(NetworkResponse response) {
statusCode=response.statusCode;
return super.parseNetworkResponse(response);
}
After that you should compare it with HttpURLConnection constants to act accordingly. For example:
int statusCode=webService.getStatusCode();
switch (statusCode){
case HttpURLConnection.HTTP_OK:
//do stuff
break;
case HttpURLConnection.HTTP_NOT_FOUND:
//do stuff
break;
case HttpURLConnection.HTTP_INTERNAL_ERROR:
//do stuff
break;
}