Created
June 6, 2019 12:17
-
-
Save RanjitPati/f60d9ddd9204abffa64cf45099cbc50b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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