package com.qimai.android.fetch.download

import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response

/**
 *   created by wangwei   ON 2019-12-31  email:wangwei_5521@163.com
 *   @version 1.1.1
 *   @Description 取消gzip压缩  否自 content-Length = -1
 **/
class DownloadInterceptor:Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val request: Request = chain.request()
        return chain.proceed(
            request.newBuilder()
                .addHeader("Accept-Encoding", "identity")
                .build()
        )
    }
}