Class HttpException

All Implemented Interfaces:
Serializable

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

  • Method Details

    • error

      public static HttpException error(String exceptionMessage)
      System error setting up the HTTP request
    • error

      public static HttpException error(String exceptionMessage, Throwable cause)
      System error setting up the HTTP request
    • create

      public static HttpException create(int httpStatusCode)
      HTTP error
    • create

      public static HttpException create(HttpResponse<?> response)
      HTTP error
    • create

      public static HttpException create(HttpException other)
      Replicate the details of an HttpException; the stacktrace will be the callers location.
    • builder

      public static HttpException.Builder builder()
    • 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
    • getHttpResponseHeaders

      public HttpHeaders getHttpResponseHeaders()
      The response headers.