Created
March 12, 2021 17:46
-
-
Save omkar-tenkale/bb64ad9ed8a9f5588921aeb77516ed58 to your computer and use it in GitHub Desktop.
retrofit logging to logcat one line
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
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