使用Retrofit2+OkHttp
监听上传或者下载进度RequestBody#writeTo
/ResponseBody#source
会执行两次的问题
- example:

- 问题原因:
使用了HttpLoggingInterceptor
拦截器,并且日志等级为HttpLoggingInterceptor.Level.BODY
- 问题解决:
使用Retrofit2+OkHttp
监听上传或者下载进度RequestBody#writeTo
/ResponseBody#source
会执行两次的问题
HttpLoggingInterceptor
拦截器,并且日志等级为HttpLoggingInterceptor.Level.BODY