We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ce53e5 commit 47265f6Copy full SHA for 47265f6
rest/src/main/java/com/liuhanling/rest/interceptor/BaseTokenInterceptor.java
@@ -38,8 +38,12 @@ public Response intercept(Chain chain) throws IOException {
38
return chain.proceed(request);
39
}
40
41
- // 添加token到Header
42
String tokenVal = TokenStore.getInstance().getToken();
+ if (TextUtils.isEmpty(tokenVal)) {
43
+ return chain.proceed(request);
44
+ }
45
+
46
+ // 添加token到Header
47
request = request.newBuilder()
48
.removeHeader(tokenKey)
49
.header(tokenKey, tokenVal)
0 commit comments