Passing Custom headers (sessionid) in fresco

128 Views Asked by At

I want to pass the sessionid as the header while downloading the image in fresco. I tried this code

val okHttpClient = OkHttpClient.Builder().addInterceptor{chain ->
          chain.proceed(chain.request().newBuilder().addHeader("YourHeader", "value").build());
    }.build();

Fresco.initialize(mContext, OkHttpImagePipelineConfigFactory.newBuilder(mContext, okHttpClient).build());

but this doesn't help as I will not have the session while initializing the fresco

0

There are 0 best solutions below