public class TokenInterceptor extends Object implements okhttp3.Interceptor
| Modifier and Type | Field and Description |
|---|---|
private static okhttp3.MediaType |
JSON |
private static okhttp3.MediaType |
JSON_UTF_8 |
static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
private TokenApi |
tokenApi |
| Constructor and Description |
|---|
TokenInterceptor(TokenApi tokenApi)
Instantiates a new Token interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
private okhttp3.Response |
doRequest(okhttp3.Interceptor.Chain chain) |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
public static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
private static final okhttp3.MediaType JSON_UTF_8
private static final okhttp3.MediaType JSON
private final TokenApi tokenApi
public TokenInterceptor(TokenApi tokenApi)
tokenApi - the token api@NotNull
public final okhttp3.Response intercept(@NotNull
okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.InterceptorIOExceptionprivate okhttp3.Response doRequest(okhttp3.Interceptor.Chain chain)
throws IOException
IOExceptionCopyright © 2024. All rights reserved.