Class HttpException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- club.minnced.discord.webhook.exception.HttpException
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class HttpException extends RuntimeException Exception thrown in case of unexpected non-2xx HTTP response.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description HttpException(int code, @NotNull String body, @NotNull Headers headers)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull StringgetBody()The body of HTTP responseintgetCode()The HTTP status code@NotNull HeadersgetHeaders()The HTTP headers.- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Method Detail- 
getCodepublic int getCode() The HTTP status code- Returns:
- The status code
 
 - 
getBody@NotNull public @NotNull String getBody() The body of HTTP response- Returns:
- The body
 
 
- 
 
-