public class ResponseCodeInterceptor extends Object implements okhttp3.Interceptor, IHttpConstants
| Modifier and Type | Class and Description |
|---|---|
static interface |
ResponseCodeInterceptor.Ignore
If a request tag() implements this interface, HTTP errors will not throw
OpenShift exceptions.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
X_OPENSHIFT_IGNORE_RCI |
AMPERSAND, AUTHORIZATION_BASIC, AUTHORIZATION_BEARER, COLON, COMMA, DEFAULT_READ_TIMEOUT, EQUALS, MEDIATYPE_ANY, MEDIATYPE_APPLICATION_FORMURLENCODED, MEDIATYPE_APPLICATION_JSON, MEDIATYPE_APPLICATION_OCTET_STREAM, MEDIATYPE_APPLICATION_XML, NO_TIMEOUT, POST, PROPERTY_ACCEPT, PROPERTY_AUTHIV, PROPERTY_AUTHKEY, PROPERTY_AUTHORIZATION, PROPERTY_CONTENT_TYPE, PROPERTY_LOCATION, PROPERTY_ORIGIN, PROPERTY_USER_AGENT, PROPERTY_WWW_AUTHENTICATE, PUT, QUESTION_MARK, SEMICOLON, SLASH, SPACE, STATUS_BAD_REQUEST, STATUS_FORBIDDEN, STATUS_INTERNAL_SERVER_ERROR, STATUS_MOVED_PERMANENTLY, STATUS_MOVED_TEMPORARILY, STATUS_NORMAL_STOP, STATUS_NOT_FOUND, STATUS_OK, STATUS_UNAUTHORIZED, STATUS_UPGRADE_PROTOCOL, VERSION| Constructor and Description |
|---|
ResponseCodeInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
static OpenShiftException |
createOpenShiftException(IClient client,
int responseCode,
String message,
String response,
Throwable e) |
static OpenShiftException |
createOpenShiftException(IClient client,
okhttp3.Response response,
Throwable e) |
static IStatus |
getStatus(String response) |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
void |
setClient(DefaultClient client) |
public static final String X_OPENSHIFT_IGNORE_RCI
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.InterceptorIOExceptionpublic void setClient(DefaultClient client)
public static OpenShiftException createOpenShiftException(IClient client, okhttp3.Response response, Throwable e) throws IOException
IOExceptionpublic static OpenShiftException createOpenShiftException(IClient client, int responseCode, String message, String response, Throwable e) throws IOException
IOExceptionCopyright © 2019 Red Hat, Inc. All Rights Reserved.