Android代码 sloth restme
sloth-restme 基于coroutines和okhttp的http请求库,多请求链式调用取消请求等 1.集成 compile 'com.stainberg.sloth:sloth-http:1.0.4' 2.使用 缓存的开启由2个地方控制 初始化缓存目录 请求中需要调用cache方法 //开启缓存策略 //初始化缓存 SlothClient.initCache(directory, 50)//缓存在指定目录下 SlothClient.initCache(context, 50)//缓存在外部存储区的cache目录中 //订阅404请求的处理逻辑 SlothClient.subscr
下载地址
用户评论