CommonLoader
parent
8fb4839c36
commit
61b2b16776
@ -0,0 +1,25 @@
|
|||||||
|
package com.common.commonlib.net;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import okhttp3.Interceptor;
|
||||||
|
|
||||||
|
public class CommonLoader<T> extends BaseObserve<T> {
|
||||||
|
|
||||||
|
public CommonLoader(@NonNull Class<T> clazz) {
|
||||||
|
this(clazz, getBaseInterceptors());
|
||||||
|
}
|
||||||
|
|
||||||
|
public CommonLoader(@NonNull Class<T> clazz, @NonNull List<? extends Interceptor> interceptors) {
|
||||||
|
super(clazz, interceptors);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<? extends Interceptor> getBaseInterceptors() {
|
||||||
|
List<Interceptor> interceptors = new ArrayList<>();
|
||||||
|
//interceptors.add(new SessionExpiredInterceptor());
|
||||||
|
return interceptors;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue