Package io.strimzi.kafka.oauth.common
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.strimzi.kafka.oauth.common.HttpException
- All Implemented Interfaces:
Serializable
An exception that signals an error status while performing a HTTP request.
When this exception is encountered it means the client successfully established the connection with the server,
established any secure (https) session, and received an HTTP response from the server.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpException(String method, URI uri, int status, String response) Create a new instance -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
Create a new instance- Parameters:
method- An HTTP method useduri- A target urlstatus- The HTTP response status coderesponse- The HTTP response body
-
-
Method Details
-
getMethod
Get the HTTP method- Returns:
- The HTTP method
-
getUri
Get the target url- Returns:
- A URI object for the url
-
getStatus
public int getStatus()Get the HTTP status- Returns:
- A status code as int
-
getResponse
Get the HTTP response body- Returns:
- A response body
-