Test your Retrofit knowledge with a free interactive quiz — 26 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
Why does Retrofit require an OkHttpClient (directly or via a default one) under the hood?
Questions in this quiz
Why does Retrofit require an OkHttpClient (directly or via a default one) under the hood?
Which annotation is used to substitute a value into a placeholder segment of the URL, e.g. turning "users/{id}" into "users/42"?
What is Retrofit?
What kind of exception does Retrofit/OkHttp typically throw for a connectivity failure, such as no internet connection or a DNS resolution failure?
What is an OkHttp interceptor, in the context of Retrofit?
What happens if you add two different JSON converter factories to the same Retrofit.Builder without careful ordering?
What does the @Multipart annotation combined with @Part indicate on a Retrofit method?
When a Retrofit interface method is declared as a suspend function, what does the caller need in order to invoke it?
What Retrofit feature would you reach for to support returning a different asynchronous wrapper type (e.g. RxJava's Single<T>) instead of Call<T> or a suspend function?
Why might a Kotlin-first project choose Moshi over Gson as its Retrofit converter?
What does calling retrofit.create(UserApi::class.java) return?
What is the role of a converter factory (like MoshiConverterFactory or GsonConverterFactory) added to Retrofit.Builder?