Kotlin Fundamentals: Connect to the internet quiz Return to pathway What are the two key things Retrofit needs to build a web-services API? The base URI for the web service and a GET query The base URI for the web service and a converter factory A network connection to the web service and an authorization token A converter factory and a parser for the response What is the purpose of the Moshi library? To get data back from a web service To interact with Retrofit to make a web-service request To parse a JSON object into Kotlin objects To rename Kotlin objects to match the keys in the JSON response What are Retrofit call adapters used for? They enable Retrofit to use coroutines. They adapt the web-service response into Kotlin data objects. They change a Retrofit call into a web-service call. They add the ability to return the default Call class in Retrofit. Which Glide method do you use to indicate the ImageView that will contain the loaded image? into() with() ImageView() apply() How do you specify a placeholder image to show when Glide is loading? Use the into() method with a drawable. Use RequestOptions() and call the placeholder() method with a drawable resource ID. Assign the Glide.placeholder property to a drawable. Use RequestOptions() and call the loadingImage() method with a drawable. How do you indicate that a method is a binding adapter? Call the setBindingAdapter() method on the LiveData. Put the method into a Kotlin file called BindingAdapters.kt. Use the android:adapter attribute in the XML layout. Annotate the method with @BindingAdapter. What does the <import> tag in an XML layout file do? Include one layout file in another. Embed Kotlin code inside the layout file. Provide access to data-bound properties. Enable you to reference classes and class members in binding expressions. How do you add a query option to a REST web-service call in Retrofit? Select all that apply. Choose as many answers as you see fit. Append the query to the end of the request URL. Add a parameter for the query to the function that makes the request and annotate the parameter with @Query. Use the Query class to build a request. Use the addQuery() method in the Retrofit builder. Submit answers error_outline An error occurred when grading the quiz. Please try again.