Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用缓存的时候报错;Application和具体调用的配置如下; #33

Open
DouLiuYongHong opened this issue Sep 14, 2018 · 0 comments

Comments

@DouLiuYongHong
Copy link

日志:io.reactivex.exceptions.ProtocolViolationException: It is not allowed to subscribe with a(n) httplibrary.http.subscriber.ApiCallbackSubscriber multiple times. Please create a fresh instance of .httplibrary.http.subscriber.ApiCallbackSubscriber and subscribe that to the target source instead.
.setHttpCache(true) //配置OkHttp缓存路径 .setHttpCacheDirectory(new File(WeiShuHttp.getContext().getCacheDir(), HttpConfig.CACHE_HTTP_DIR))

Http.BASE(new ApiGetRequest(HttpUrl.Algorithm.algorithmSetting + "/" + BaseApplication.getUserId())) .addHeader("token", BaseApplication.getToken()) .setLocalCache(true) .cacheMode(CacheMode.FIRST_CACHE) .request(new ACallback<RpParamModel>() { @Override public void onSuccess(RpParamModel data) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant