Skip to content

Instantly share code, notes, and snippets.

@WarrenFaith
Created August 24, 2016 16:21
Show Gist options
  • Save WarrenFaith/cbbb194a6db913aeec1e5fc3e05a257d to your computer and use it in GitHub Desktop.
Save WarrenFaith/cbbb194a6db913aeec1e5fc3e05a257d to your computer and use it in GitHub Desktop.
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
interceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);
OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(BuildConfig.API_BITCOIN_BASE_URL)
.client(client)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment