Android Build a Weather App Concurrency and Error Handling Making Our Code Asynchronous

i am not getting json data from darksky website API

Why am i getting response.body().toString() value is okhttp3.internal.http.RealResponseBody@23c99a6 from darksky API

1 Answer

Hi Pradeep. Without seeing the rest of our code, it's difficult, but try:


instead of (...).toString()

toString() converts an Object into a String (a String representation of an Object if you prefer). That's what okhttp3.internal.http.RealResponseBody@23c99a6 is here. To get your request's response, you should call: response.body().string();

Hope that helps :)