Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Class Info |
|---|
public class HttpResponseException extends IOException Exception thrown when an error status code is detected in the HTTP response. |
Constructor Name |
|---|
HttpResponseException(HttpResponse response) Constructs an HttpResponseException object. |
Qualifier and Type | Method Name and Description |
|---|---|
StringBuffer | computeMessageBuffer(HttpResponse response) Creates a StringBuilder object containing the error information of the given HTTP response. |
final String | Obtains the HTTP response content. |
final ErrorResponse | getError() Obtains the error response. |
| Obtains headers in the HTTP response. | |
final int | Obtains the HTTP status code. |
final String | Obtains the HTTP status information. |
final boolean | Checks whether a success HTTP status code is received. |
Constructor |
|---|
public HttpResponseException(HttpResponse response) Constructs an HttpResponseException object. |
Parameters
Name | Description |
|---|---|
response | HTTP response. |
Method |
|---|
public static StringBuilder computeMessageBuffer(HttpResponse response) Creates a StringBuilder object containing the error information of the given HTTP response. |
Parameters
Name | Description |
|---|---|
response | HTTP response. |
Returns
Type | Description |
|---|---|
StringBuilder | Error information of the given HTTP response. |
Method |
|---|
public final String getContent() Obtains the HTTP response content. |
Returns
Type | Description |
|---|---|
final String | HTTP response content. |
Method |
|---|
public final ErrorResponse getError() Obtains the error response. |
Returns
Type | Description |
|---|---|
ErrorResponse | Error response object. |
Method |
|---|
public HttpHeaders getHeaders() Obtains headers in the HTTP response. |
Returns
Type | Description |
|---|---|
HttpHeaders | Headers in the HTTP response. |
Method |
|---|
public final int getStatusCode() Obtains the HTTP status code. |
Returns
Type | Description |
|---|---|
final int | HTTP status code. |
Method |
|---|
public final String getStatusMessage() Obtains the HTTP status information. |
Returns
Type | Description |
|---|---|
final String | HTTP status information. |
Method |
|---|
public final boolean isSuccessStatusCode() Checks whether a success HTTP status code is received. |
Returns
Type | Description |
|---|---|
final boolean | Whether a success HTTP status code is received. |