You can leave a log using the code below.
OkHttpClient client = new OkHttpClient.Builder()
.addNetworkInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
.build();
Retrofit retrofit = new Retrofit.Builder()
.client(client)
.baseUrl(baseUrl)
.build();
You can set the log level to suit your taste with BASIC, HEADERS, and BODY, so set it to the level you need.
© 2024 OneMinuteCode. All rights reserved.