Class HttpException

All Implemented Interfaces:
Serializable

public class HttpException extends RuntimeException
Class of HTTP Exceptions
See Also:
  • Constructor Details

    • HttpException

      public HttpException(int statusCode)
    • HttpException

      public HttpException(int statusCode, String statusLine)
    • HttpException

      public HttpException(int statusCode, String statusLine, String response)
    • HttpException

      public HttpException(String message)
    • HttpException

      public HttpException(String message, Throwable cause)
    • HttpException

      public HttpException(Throwable cause)
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Gets the status code, may be -1 if unknown
      Returns:
      Status Code if known, -1 otherwise
    • getStatusLine

      public String getStatusLine()
      Gets the status line text, may be null if unknown. HTTP/2 does not have status line text; the default HTTP 1.1 message is returned.
      Returns:
      Status line
    • getResponse

      public String getResponse()
      The response payload from the remote.
      Returns:
      The payload, or null if no payload