In this video we will learn how to use Retrofit to post data on REST Web service.
Retrofit allows easy communication with a web service by abstracting the HTTP API into a Java interface.
1. We will set up Retrofit in a new Android Studio project by adding the necessary Gradle dependencies.
2. We create an interface with 1 method that we annotate with @POST and the relative URL to the API endpoint of the REST API we want to query.
3. We then create a Retrofit instance, define the baseUrl, add GSON as the converter by passing GsonConverterFactory to the addConverterFactory method, and let Retrofit create the implementation of our API interface at compile time.
For Pagination video:
#json #retrofit2 #androidstudio #java #RestAPI
• Pagination in RecyclerView in Hindi Tutori...
For ViewPager in recyclerview:
• ViewPager inside Recyclerview using Retrof...
For Whole Playlist video:
• Misc
Follow us on our Social Media Handles -
Instagram- / prodevlogger