Class HttpException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.maxmind.minfraud.exception.HttpException
All Implemented Interfaces:
Serializable

public final class HttpException extends IOException
This class represents an HTTP transport error. This is not an error returned by the web service itself. As such, it is a IOException instead of a MinFraudException.
See Also:
  • Constructor Details

    • HttpException

      public HttpException(String message, int httpStatus, URI uri)
      Parameters:
      message - A message describing the reason why the exception was thrown.
      httpStatus - The HTTP status of the response that caused the exception.
      uri - The URI queried.
    • HttpException

      public HttpException(String message, int httpStatus, URI uri, Throwable cause)
      Parameters:
      message - A message describing the reason why the exception was thrown.
      httpStatus - The HTTP status of the response that caused the exception.
      uri - The URI queried.
      cause - The cause of the exception.
  • Method Details

    • getHttpStatus

      public int getHttpStatus()
      Returns:
      the HTTP status of the query that caused the exception.
    • getUri

      public URI getUri()
      Returns:
      the URI queried.
    • getUrl

      @Deprecated public URL getUrl()
      Deprecated.
      Use getUri() instead
      Returns:
      the URL queried.