接口 ClientHttpResponse
- 所有超级接口:
AutoCloseable,Closeable,HttpInputMessage,HttpMessage
- 所有已知实现类:
BufferingClientHttpResponseWrapper,ClientHttpResponseDecorator,HttpComponentsClientHttpResponse,IntrospectingClientHttpResponse,JdkClientHttpResponse,JettyClientHttpResponse,ReactorNettyClientResponse,SimpleClientHttpResponse
Represents a client-side HTTP response.
Obtained via an invocation of ClientHttpRequest.execute().
A ClientHttpResponse must be closed,
typically in a finally block.
- 从以下版本开始:
- 4.0
- 作者:
- Arjen Poutsma, Harry Yang
-
方法概要
修饰符和类型方法说明voidclose()Close this response, freeing any resources created.default intGet the HTTP status code (potentially non-standard and not resolvable through theHttpStatusCodeenum) as an integer.Get the HTTP status code as anHttpStatusCode.Get the HTTP status text of the response.从接口继承的方法 cn.taketoday.http.HttpInputMessage
getBody从接口继承的方法 cn.taketoday.http.HttpMessage
getHeaders
-
方法详细资料
-
getStatusCode
Get the HTTP status code as anHttpStatusCode.- 返回:
- the HTTP status as
HttpStatusCodevalue (nevernull) - 抛出:
IOException- in case of I/O errors
-
getRawStatusCode
Get the HTTP status code (potentially non-standard and not resolvable through theHttpStatusCodeenum) as an integer.- 返回:
- the HTTP status as an integer value
- 抛出:
IOException- in case of I/O errors- 另请参阅:
-
getStatusText
Get the HTTP status text of the response.- 返回:
- the HTTP status text
- 抛出:
IOException- in case of I/O errors
-
close
void close()Close this response, freeing any resources created.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable
-