To receive a response using OkHttp, you must first implement the OkHttp library (link below).
Then you need to use a request using Callback. The code may seem a little complicated, but it's standard code that gets repeated over and over again.
Install OkHttp library:
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
Test API Request:
https://reqres.in/api/users?page=2