Class HttpResponseException

    • Constructor Summary

      Constructors 
      Constructor Description
      HttpResponseException​(int statusCode, java.lang.String reasonPhrase)
      Constructs a new instance of HttpResponseException with the given status code and reason phrase, and no content bytes or content type.
      HttpResponseException​(int statusCode, java.lang.String reasonPhrase, byte[] contentBytes, org.apache.hc.core5.http.ContentType contentType)
      Constructs a new instance of HttpResponseException with the given status code, reason phrase, content bytes, and content type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getContentBytes()  
      org.apache.hc.core5.http.ContentType getContentType()  
      java.lang.String getReasonPhrase()  
      int getStatusCode()  
      • 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
    • Field Detail

      • statusCode

        private final int statusCode
      • reasonPhrase

        private final java.lang.String reasonPhrase
      • contentBytes

        private final byte[] contentBytes
      • contentType

        private final org.apache.hc.core5.http.ContentType contentType
    • Constructor Detail

      • HttpResponseException

        public HttpResponseException​(int statusCode,
                                     java.lang.String reasonPhrase)
        Constructs a new instance of HttpResponseException with the given status code and reason phrase, and no content bytes or content type.
        Parameters:
        statusCode - the HTTP status code
        reasonPhrase - the reason phrase associated with the HTTP status code
      • HttpResponseException

        public HttpResponseException​(int statusCode,
                                     java.lang.String reasonPhrase,
                                     byte[] contentBytes,
                                     org.apache.hc.core5.http.ContentType contentType)
        Constructs a new instance of HttpResponseException with the given status code, reason phrase, content bytes, and content type.
        Parameters:
        statusCode - the HTTP status code
        reasonPhrase - the reason phrase associated with the HTTP status code
        contentBytes - the content bytes of the HTTP response
        contentType - the content type of the HTTP response
    • Method Detail

      • getStatusCode

        public int getStatusCode()
      • getReasonPhrase

        public java.lang.String getReasonPhrase()
      • getContentBytes

        public byte[] getContentBytes()
      • getContentType

        public org.apache.hc.core5.http.ContentType getContentType()