Top "Retrofit2" questions

Retrofit2 is the second version of the type-safe REST client Retrofit for Android and Java.

Is it possible to show progress bar when download via Retrofit 2 Asynchronous?

@Streaming @GET Call<ResponseBody> downloadSong(@Url String url); Above code is used to download file asynchronously using retrofit. …

android download retrofit retrofit2 progress
Turn string date from json to a Date object with Moshi

with Gson you would do this Gson gson = new GsonBuilder() .setDateFormat("yyyy-MM-dd'T'HH:mm") .create(); and pass it to the retrofit …

android retrofit2 moshi
How use Kotlin enum with Retrofit?

How can I parse JSON to model with enum? Here is my enum class: enum class VehicleEnumEntity(val value: String) { …

android enums gson kotlin retrofit2
Enable TLS 1.2 in Android 4.4

I use Retrofit and OkHttp3 for making requests. I konw that in Android 4.4 TLS 1.1 and TLS 1.2 are not enabled by …

android retrofit2 android-4.4-kitkat tls1.2 okhttp3
java.lang.BootstrapMethodError: Exception from call site #4 bootstrap method ,when initializing Retrofit

I am using retrofit to get sample data from "https://jsonplaceholder.typicode.com/comments" but I am getting this error: 2020…

android json android-studio retrofit2
Retrofit 2 Error: java.net.SocketTimeoutException: failed to connect to /192.168.86.1 (port 8080) after 10000ms

I'm trying to make my App connect to a local web service using Retrofit 2 but i'm always getting this error. …

android retrofit2 timeoutexception
What can we put as parameter of okhttp3 MediaType.parse method for an audio file?

I found that for uploading images using Android with a RequestBody, we can use MediaType.parse("image/jpeg"). However, what …

android retrofit2 okhttp3 media-type
Got this error with retrofit2 & OkHttp3. Unable to resolve host "<host-name>": No address associated with hostname

I am using the retrofit 2 and OkHttp3 to request data from server. I just added a offline cache code but …

android okhttp retrofit2 offline-caching okhttp3
Kotlin Android Retrofit 2.6.0 with coroutines error handling

I am using Retrofit 2.6.0 with coroutines for my web service call. I am getting the API response properly with all …

android kotlin retrofit retrofit2