Consume API with Retrofit
- First adding dependencies in build.gradle
- Make Data Class, based on response api
- Make Api Service, based on URL API, for example: https://reqres.in/api/users?page=1
- Base URL : https://reqres.in/
- Endpoint : api/users
- Parameter : ?page=1
- Create Api Config
- Last, getting data response using enqueue method.
.png)
.png)
.png)
.png)
.png)
.png)
Komentar
Posting Komentar