Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omkar-tenkale/bb64ad9ed8a9f5588921aeb77516ed58 to your computer and use it in GitHub Desktop.
Save omkar-tenkale/bb64ad9ed8a9f5588921aeb77516ed58 to your computer and use it in GitHub Desktop.
retrofit logging to logcat one line
private MovieService() {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(URL)
.client(new OkHttpClient.Builder().addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)).build())
.addConverterFactory(GsonConverterFactory.create())
.build();
mMovieApi = retrofit.create(MovieApi.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment