类 JdkClientHttpResponse
java.lang.Object
cn.taketoday.http.client.JdkClientHttpResponse
- 所有已实现的接口:
ClientHttpResponse,HttpInputMessage,HttpMessage,Closeable,AutoCloseable
ClientHttpResponse implementation based on the Java HttpClient.- 从以下版本开始:
- 4.0 2023/7/1 19:57
- 作者:
- Marten Deinum, Arjen Poutsma, Harry Yang
-
字段概要
字段修饰符和类型字段说明private final InputStreamprivate final HttpHeadersprivate final HttpResponse<InputStream> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static HttpHeadersadaptHeaders(HttpResponse<?> response) voidclose()Close this response, freeing any resources created.getBody()Return the body of the message as an input stream.Return the headers of this message.Get the HTTP status code as anHttpStatusCode.Get the HTTP status text of the response.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.client.ClientHttpResponse
getRawStatusCode
-
字段详细资料
-
response
-
headers
-
body
-
-
构造器详细资料
-
JdkClientHttpResponse
-
-
方法详细资料
-
adaptHeaders
-
getStatusCode
从接口复制的说明:ClientHttpResponseGet the HTTP status code as anHttpStatusCode.- 指定者:
getStatusCode在接口中ClientHttpResponse- 返回:
- the HTTP status as
HttpStatusCodevalue (nevernull)
-
getStatusText
从接口复制的说明:ClientHttpResponseGet the HTTP status text of the response.- 指定者:
getStatusText在接口中ClientHttpResponse- 返回:
- the HTTP status text
-
getHeaders
从接口复制的说明:HttpMessageReturn the headers of this message.- 指定者:
getHeaders在接口中HttpMessage- 返回:
- a corresponding HttpHeaders object (never
null)
-
getBody
从接口复制的说明:HttpInputMessageReturn the body of the message as an input stream.- 指定者:
getBody在接口中HttpInputMessage- 返回:
- the input stream body (never
null) - 抛出:
IOException- in case of I/O errors
-
close
public void close()从接口复制的说明:ClientHttpResponseClose this response, freeing any resources created.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中ClientHttpResponse- 指定者:
close在接口中Closeable
-