java.io.IOException: closed
at okio.RealBufferedSource$1.read(RealBufferedSource.java:405)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:161)
at java.io.BufferedReader.readLine(BufferedReader.java:324)
at java.io.BufferedReader.readLine(BufferedReader.java:389)
at cn.com.cdjh.HttpRequestUtil.OkHttpUtil.okhttpRequest(OkHttpUtil.java:104)
at cn.com.cdjh.HttpRequestUtil.OkHttpUtil.getUserInfo(OkHttpUtil.java:144)
这个错误是由于response.body().string()
调用了多次导致的,string()
仅可调用一次。