其实主要是其.string()方法,内部 return new String(bytes(), charset().name())
每个ResponseBody实例只能读取一次,在实践中,因为没有自动缓冲发生。string()实际上是对输入的详尽读取,因此在后续调用底层数据源为空。
stack overflow的回答
The response body can be consumed only once.
This class may be used to stream very large responses. For example, it is possible to use this class to read a response that is larger than the entire memory allocated to the current process. It can even stream a response larger than the total storage on the current device, which is a common requirement for video streaming applications.
Because this class does not buffer the full response in memory, the application may not re-read the bytes of the response. Use this one shot to read the entire response into memory with bytes() or string(). Or stream the response with either source(), byteStream(), or charStream().