类 UnknownContentTypeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.taketoday.core.NestedRuntimeException
cn.taketoday.web.client.RestClientException
cn.taketoday.web.client.UnknownContentTypeException
- 所有已实现的接口:
Serializable
Raised when no suitable
HttpMessageConverter could be
found to extract the response.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final MediaTypeprivate final byte[]private final HttpHeadersprivate static final longprivate final HttpStatusCodeprivate final Stringprivate final Type -
构造器概要
构造器构造器说明UnknownContentTypeException(Type targetType, MediaType contentType, int statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data.UnknownContentTypeException(Type targetType, MediaType contentType, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data. -
方法概要
修饰符和类型方法说明Return the content type of the response, or "application/octet-stream".intReturn the raw HTTP status code value.byte[]Return the response body as a byte array.Return the response body converted to String using the charset from the response "Content-Type" or"UTF-8"otherwise.Return the HTTP response headers.Return the HTTP status code value.Return the HTTP status text.Return the target type expected for the response.从类继承的方法 cn.taketoday.core.NestedRuntimeException
contains, getMostSpecificCause, getNestedMessage, getRootCause
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
targetType
-
contentType
-
statusCode
-
statusText
-
responseBody
private final byte[] responseBody -
responseHeaders
-
-
构造器详细资料
-
UnknownContentTypeException
public UnknownContentTypeException(Type targetType, MediaType contentType, int statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data.- 参数:
targetType- the expected target typecontentType- the content type of the responsestatusCode- the raw status code valuestatusText- the status textresponseHeaders- the response headers (may benull)responseBody- the response body content (may benull)
-
UnknownContentTypeException
public UnknownContentTypeException(Type targetType, MediaType contentType, HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) Construct a new instance of with the given response data.- 参数:
targetType- the expected target typecontentType- the content type of the responsestatusCode- the raw status code valuestatusText- the status textresponseHeaders- the response headers (may benull)responseBody- the response body content (may benull)
-
-
方法详细资料
-
getTargetType
Return the target type expected for the response. -
getContentType
Return the content type of the response, or "application/octet-stream". -
getStatusCode
Return the HTTP status code value. -
getRawStatusCode
public int getRawStatusCode()Return the raw HTTP status code value. -
getStatusText
Return the HTTP status text. -
getResponseHeaders
Return the HTTP response headers. -
getResponseBody
public byte[] getResponseBody()Return the response body as a byte array. -
getResponseBodyAsString
Return the response body converted to String using the charset from the response "Content-Type" or"UTF-8"otherwise.
-