-2
Ich versuche, Json von Retrofit2 (Retrofit 2.1.0) und Gson zu bekommen. Aber Antwortkörper ist nicht. Nein in auf onFailure. Bitte hilf mir.Retrofit2 und Gson haben keine Antwort in Logcat
Ich versuche, Json von Retrofit2 (Retrofit 2.1.0) und Gson zu bekommen. Aber Antwortkörper ist nicht. Nein in auf onFailure. Bitte hilf mir.Retrofit2 und Gson haben keine Antwort in Logcat
diese
in Ihrem gradle hinzufügencompile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
Retrofit
HttpLoggingInterceptor logger = new HttpLoggingInterceptor();
logger.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(logger)
.build();
retrofit = new Retrofit.Builder()
.baseUrl(RETROFIT_BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.client(client)
.build();
Vielen Dank! : D – ultron999