What is Retrofit?
Retrofit is a type-safe HTTP client for Android and Java developed by Square. Using Retrofit we can easily translate the REST APIs to Java Interfaces. Retrofit can be used as the best alternative to Volley. Retrofit Uses OkHttp for making HTTP requests. Retrofit easily translates JSON or XML response to POJO’s (Plain Old Java Objects). In order to Serialize the JSON we can make use of the following Libraries:
Converter | Library |
---|---|
Gson | com.squareup.retrofit2:converter-gson:2.1.0 |
Jackson | com.squareup.retrofit2:converter-jackson:2.1.0 |
Moshi | com.squareup.retrofit2:converter-moshi:2.1.0 |
Protobuf | com.squareup.retrofit2:converter-protobuf:2.1.0 |
Wire | com.squareup.retrofit2:converter-wire:2.1.0 |
Simple XML | com.squareup.retrofit2:converter-simplexml:2.1.0 |
Comments
Post a Comment