Code example for ClientProtocolException

Methods: getMessage

0
            client.setCookieStore(cookie_store);
            String response_str;
            try { 
                response_str = client.execute(request, new StringResponseHandler());
            } catch (ClientProtocolException e) {
                throw new HQTPAPIException(e.getMessage());
            } finally { 
                client.getConnectionManager().shutdown();
            } 
 
            cookie_store = client.getCookieStore();
            return response_str;
        } 
 
        /** 
         * A class that converts HttpResponse to String with some checks. 
         * It is strange but this way is safer than the way to treat HttpResponse returned by 
         * DefaultHttpClient.execute(HttpUriRequest). 
         */ 
        private class StringResponseHandler implements ResponseHandler<String> {
            @Override