Last active
April 26, 2018 08:50
-
-
Save AkshayMoorthy/001f60f9857e8e52d0ab21176eeb6ae2 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
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder(); | |
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); | |
// set your desired log level | |
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); | |
// add logging as last interceptor | |
clientBuilder.addInterceptor(loggingInterceptor); | |
return new Retrofit.Builder().baseUrl(ROOT_URL) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment