I implement my http calls via the OkHttp library. Everything works fine, but I noticed that, when I access the body as a string of the response twice an
string method on the response will read the input (network) stream and convert it into a string. So it dynamically builds the string and returns it to you. The second time you call it, the network stream has already been consumed and is no longer available.
You should save the result of
string into a String variable, and then access it as many times as needed.