Code example for ClientProtocolException

Methods: getMessage

            String response_str;
            try { 
                response_str = client.execute(request, new StringResponseHandler());
            } catch (ClientProtocolException e) {
                throw new HQTPAPIException(e.getMessage());
            } finally { 
            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> {
Connect your IDE to all the code out there  Get Codota for Java