public final class HttpException extends IOException
Exposes the specific status code or UNKNOWN
via getStatusCode()
so
users may attempt to retry or otherwise uniformly handle certain types of errors regardless of
the underlying http library.
限定符和类型 | 字段和说明 |
---|---|
static int |
UNKNOWN |
构造器和说明 |
---|
HttpException(int statusCode) |
HttpException(String message) |
HttpException(String message,
int statusCode) |
HttpException(String message,
int statusCode,
Throwable cause) |
限定符和类型 | 方法和说明 |
---|---|
int |
getStatusCode()
Returns the http status code, or
UNKNOWN if the request failed without providing
a status code. |
public static final int UNKNOWN
public HttpException(int statusCode)
public HttpException(String message)
public HttpException(String message, int statusCode)
public int getStatusCode()
UNKNOWN
if the request failed without providing
a status code.