在okhttp3 中response.body().string() 只能使用一次
public final String string() throws IOException { BufferedSource source = this.source(); String var3; try { Charset charset = Util.bomAwareCharset(source, this.charset()); var3 = source.readString(charset); } finally { Util.closeQuietly(source); } return var3; }
public static void closeQuietly(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (RuntimeException var2) { throw var2; } catch (Exception var3) { } } }
调用一次就会把流关掉,再次调用就会抛出异常