Top Description Fields Constructors Methods
org.springframework.web.client

public Class UnknownHttpStatusCodeException

extends RestClientResponseException
Class Inheritance
Imports
java.nio.charset.Charset, org.springframework.http.HttpHeaders, org.springframework.lang.Nullable

Exception thrown when an unknown (or custom) HTTP status code is received.
Author
Rossen Stoyanchev
Since
3.2

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
UnknownHttpStatusCodeException(int
the raw status code value
rawStatusCode
,
String
the status text
statusText
,
HttpHeaders
the response headers (may be null)
responseHeaders
,
byte[]
the response body content (may be null)
responseBody
,
Charset
the response body charset (may be null)
responseCharset
)

Construct a new instance of HttpStatusCodeException based on a status code, status text, and response body content.

public
UnknownHttpStatusCodeException(String message, int
the raw status code value
rawStatusCode
,
String
the status text
statusText
,
HttpHeaders
the response headers (may be null)
responseHeaders
,
byte[]
the response body content (may be null)
responseBody
,
Charset
the response body charset (may be null)
responseCharset
)

Construct a new instance of HttpStatusCodeException based on a status code, status text, and response body content.

Method Summary

Inherited from org.springframework.web.client.RestClientResponseException:
getRawStatusCodegetResponseBodyAsgetResponseBodyAsgetResponseBodyAsByteArraygetResponseBodyAsStringgetResponseBodyAsStringgetResponseHeadersgetStatusCodegetStatusTextsetBodyConvertFunction

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.springframework.web.client.RestClientResponseException.serialVersionUID.

Constructor Detail

UnknownHttpStatusCodeExceptionback to summary
public UnknownHttpStatusCodeException(int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)

Construct a new instance of HttpStatusCodeException based on a status code, status text, and response body content.

Parameters
rawStatusCode:int

the raw status code value

statusText:String

the status text

responseHeaders:HttpHeaders

the response headers (may be null)

responseBody:byte[]

the response body content (may be null)

responseCharset:Charset

the response body charset (may be null)

UnknownHttpStatusCodeExceptionback to summary
public UnknownHttpStatusCodeException(String message, int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)

Construct a new instance of HttpStatusCodeException based on a status code, status text, and response body content.

Parameters
rawStatusCode:int

the raw status code value

statusText:String

the status text

responseHeaders:HttpHeaders

the response headers (may be null)

responseBody:byte[]

the response body content (may be null)

responseCharset:Charset

the response body charset (may be null)

Since
5.2.2