spring-framework / org.springframework.web.reactive.function.client / WebClientResponseException

WebClientResponseException

open class WebClientResponseException : WebClientException

Exceptions that contain actual HTTP response data.

Author
Arjen Poutsma

Since
5.0

Constructors

<init>

WebClientResponseException(message: String, statusCode: Int, statusText: String, headers: HttpHeaders, responseBody: ByteArray, responseCharset: Charset)

Construct a new instance of with the given response data.

Functions

getHeaders

open fun getHeaders(): HttpHeaders

Return the HTTP response headers.

getRawStatusCode

open fun getRawStatusCode(): Int

Return the raw HTTP status code value.

getResponseBodyAsByteArray

open fun getResponseBodyAsByteArray(): ByteArray

Return the response body as a byte array.

getResponseBodyAsString

open fun getResponseBodyAsString(): String

Return the response body as a string.

getStatusCode

open fun getStatusCode(): HttpStatus

Return the HTTP status code value.

getStatusText

open fun getStatusText(): String

Return the HTTP status text.