Class HttpClientException

  • All Implemented Interfaces:
    java.io.Serializable

    public class HttpClientException
    extends java.lang.RuntimeException
    Root exception for DefaultHttpClient interactions.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpClientException​(java.lang.String message, java.lang.Exception cause)
      An exception with a message and a root cause.
      HttpClientException​(java.lang.String message, java.lang.Exception cause, java.lang.String url, int statusCode, java.lang.String body)
      An exception with a message, root cause, and HTTP response data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBody()
      Get the response body.
      int getStatusCode()
      Get the HTTP status code.
      java.lang.String getUrl()
      Get the URL.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HttpClientException

        public HttpClientException​(java.lang.String message,
                                   java.lang.Exception cause)
        An exception with a message and a root cause.
        Parameters:
        message - The message describing the exception.
        cause - The initial cause of the exception.
      • HttpClientException

        public HttpClientException​(java.lang.String message,
                                   java.lang.Exception cause,
                                   java.lang.String url,
                                   int statusCode,
                                   java.lang.String body)
        An exception with a message, root cause, and HTTP response data.
        Parameters:
        message - The message describing the exception.
        cause - The initial cause of the exception.
        url - The URL.
        statusCode - The HTTP status code.
        body - The response body.
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
        Get the URL.
      • getStatusCode

        public int getStatusCode()
        Get the HTTP status code.
      • getBody

        public java.lang.String getBody()
        Get the response body.