public interface HttpResponse extends Closeable
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
body()
获取响应主体
|
byte[] |
bodyAsBytes()
获取响应主体字节数组
|
String |
bodyAsString()
获取响应主体字符串
|
int |
code()
获取响应代码
|
Charset |
contentEncoding()
获取内容编码
|
Long |
contentLength()
获取内容长度
|
String |
contentType()
获取内容类型
|
List<String> |
cookies()
获取小饼数组
|
String |
header(String name)
获取头值
|
Collection<String> |
headerNames()
获取头名
|
List<String> |
headers(String name)
获取头值数组
|
Collection<String> headerNames()
Long contentLength()
String contentType()
Charset contentEncoding()
int code()
InputStream body()
byte[] bodyAsBytes()
throws IOException
IOExceptionString bodyAsString() throws IOException
IOExceptionCopyright © 2024. All rights reserved.