public final class HttpResponseException extends RuntimeException
RuntimeException that is raised to send an HTTP response with the content specified
by a user. This class holds an HttpResponse which would be sent back to the client who
sent the corresponding request.HttpStatusException,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
Throwable |
fillInStackTrace() |
HttpResponse |
httpResponse()
Returns the
HttpResponse which would be sent back to the client who sent the
corresponding request. |
static HttpResponseException |
of(AggregatedHttpResponse aggregatedResponse)
Returns a new
HttpResponseException instance with the specified AggregatedHttpResponse. |
static HttpResponseException |
of(HttpResponse httpResponse)
Returns a new
HttpResponseException instance with the specified HttpResponse. |
static HttpResponseException |
of(HttpStatus httpStatus)
Returns a new
HttpResponseException instance with the specified HttpStatus. |
static HttpResponseException |
of(int statusCode)
Returns a new
HttpResponseException instance with the specified HTTP status code. |
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static HttpResponseException of(int statusCode)
HttpResponseException instance with the specified HTTP status code.public static HttpResponseException of(HttpStatus httpStatus)
HttpResponseException instance with the specified HttpStatus.public static HttpResponseException of(AggregatedHttpResponse aggregatedResponse)
HttpResponseException instance with the specified AggregatedHttpResponse.public static HttpResponseException of(HttpResponse httpResponse)
HttpResponseException instance with the specified HttpResponse.public HttpResponse httpResponse()
HttpResponse which would be sent back to the client who sent the
corresponding request.public Throwable fillInStackTrace()
fillInStackTrace in class ThrowableCopyright © 2020 LeanCloud. All rights reserved.