Friday, October 19, 2018

REST API

What is Retrofit?
------------------
Retrofit is a type-safe HTTP client for Android and Java. You can make network requests using Retrofit and it is used in android to call RESTful APIs. 

Why Retrofit?
--------------
Though it is not necessary that you use a library like Retrofit for the network calls in your application. But if you will not use a library you have to take care of a lot of things, and it increases the task and amount of code. 
Whereas Retrofit has predefined methods to quickly perform network requests. We also have other libraries in android for example volley, but if you are still using Volley for network operations then it is highly recommended that you should migrate to retrofit now. Retrofit is better than volley. 

No comments:

Post a Comment