i was trying to make kotlin covid console app from...
# announcements
a
i was trying to make kotlin covid console app from rapid api and they give me this code
Copy code
val client = OkHttpClient()
val request = Request.Builder()
        .url("<https://covid-193.p.rapidapi.com/countries>").get()
        .addHeader("x-rapidapi-host", "<http://covid-193.p.rapidapi.com|covid-193.p.rapidapi.com>")
        .addHeader("x-rapidapi-key", "e9a2bc7b8amshcb0d6ea32047c46p129305jsnf42297251e7d")
        .build()
val response = client.newCall(request).execute()
then i run this code and give me this
Response{protocol=http/1.1, code=200, message=OK, url=<https://covid-193.p.rapidapi.com/countries>}
but all i want was to show me the countries and affected person number i download retrofit and gson but it look little bit harder how do i use it
c
sounds like you need to retrieve the response body from the request
a
how
z