package com.zaojiao.http.interceptor

import okhttp3.Interceptor
import okhttp3.Response
import javax.inject.Inject

class TokenInterceptor @Inject constructor() : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val newRequest = chain.request().newBuilder()

        newRequest.addHeader("token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxNTgwODM5MzQ4NzU5Mjg5ODU4IiwiZXhwIjoxNjg5MDU1MDE4fQ.Qn32mhfgKmcp5JqQR3HQspDOydFsAHJxNAe6BpyHOpo")

        return chain.proceed(newRequest.build())
    }
}