Class Info |
|---|
public class HttpResponseException extends IOException 在HTTP响应中检测到错误状态代码时引发异常。 |
Constructor Name |
|---|
HttpResponseException(HttpResponse response) HttpResponseException类构造方法。 |
Qualifier and Type | Method Name and Description |
|---|---|
StringBuffer | computeMessageBuffer(HttpResponse response) 创建存放给定HTTP响应的异常信息的StringBuilder 对象。 |
final String | 获取HTTP响应内容。 |
final ErrorResponse | getError() 获取错误响应。 |
| 获取HTTP响应消息头。 | |
final int | 获取HTTP状态码。 |
final String | 获取HTTP状态信息。 |
final boolean | 是否接收到一个成功的HTTP状态码。 |
Constructor |
|---|
public HttpResponseException(HttpResponse response) HttpResponseException构造方法。 |
Parameters
Name | Description |
|---|---|
response | HTTP响应。 |
Method |
|---|
public static StringBuilder computeMessageBuffer(HttpResponse response) 创建存放给定HTTP响应的异常信息的StringBuilder 对象。 |
Parameters
Name | Description |
|---|---|
response | HTTP响应。 |
Returns
Type | Description |
|---|---|
StringBuilder | 返回给定HTTP响应的异常信息。 |
Method |
|---|
public final String getContent() 获取HTTP响应内容。 |
Returns
Type | Description |
|---|---|
final String | 返回HTTP响应的内容。 |
Method |
|---|
public final ErrorResponse getError() 获取错误响应。 |
Returns
Type | Description |
|---|---|
ErrorResponse | 返回一个错误响应对象。 |
Method |
|---|
public HttpHeaders getHeaders() 获取HTTP响应消息头。 |
Returns
Type | Description |
|---|---|
HttpHeaders | 返回HTTP响应消息头。 |
Method |
|---|
public final int getStatusCode() 获取HTTP状态码。 |
Returns
Type | Description |
|---|---|
final int | 返回HTTP状态码。 |