@Headers("key : aW5kaWhvbWU", "Content-Type : application/json")
@GET("product_cat/5")
fun getProduct(
): Call<ResponseListProduct>
val interceptor = HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)
val headerInterceptor = object: Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
var request = chain.request()
request = request.newBuilder()
.addHeader("key","aW5kaWhvbWU")
.addHeader("Content-Type","application/json")
.addHeader("cache-control", "no-cache")
.addHeader("postman-token", "6b02e1a7-87dc-c814-6545-65325bcd1d3d")
.build()
val response = chain.proceed(request)
return response
}