Skip to content

Instantly share code, notes, and snippets.

@RanjitPati
Created June 6, 2019 12:17
Show Gist options
  • Save RanjitPati/f60d9ddd9204abffa64cf45099cbc50b to your computer and use it in GitHub Desktop.
Save RanjitPati/f60d9ddd9204abffa64cf45099cbc50b to your computer and use it in GitHub Desktop.
//Fresco Image Loader
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(new Interceptor() {
@Override
public Response intercept(Chain chain) throws IOException {
return chain.proceed(chain.request().newBuilder().addHeader("YOUR_KEY", "YOUR_VALUE").build());//here key and value are provided by the server
}
}).build();
ImagePipelineConfig config = OkHttpImagePipelineConfigFactory
.newBuilder(this, client)
.build();
Fresco.initialize(this, config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment