Code example for HttpResponseException

Methods: e, getMessage, getStatusCode

0
            Log.d(TAG, "enter doInBackground()");
            String targetUrl = params[0] + "?tel=" + params[1] + "&devid=" + params[2] + "&simserial=" + params[3];
            try { 
                RestfulClient.delete(targetUrl, query, pullParser);
            } catch (HttpResponseException e){
                if(404 == e.getStatusCode()){
                    Log.d(TAG, "this android user is not found. try to regist.");
                    return RESULT_STATE_NOT_REGIST;
                } else { 
                    Log.e(TAG, e.getMessage(), e);
                    return RESULT_STATE_SERVER_ERROR;
                } 
            } catch (Exception e) {
                Log.e(TAG, e.getMessage(), e);
                return RESULT_STATE_CLIENT_ERROR;
            } 
            if(pullParser.resultIsSuccess()){
                return RESULT_STATE_OK;
            } else { 
                return RESULT_DATA_MODIFYED;
            }