这是萤石的一个 get提交参数 访问网址 返回json的一个接口,求解
代码
Response response=Http.get("https://open.ys7.com/api/lapp/token/get", map, 60*1000);
System.out.println(response.getContent());
System.out.println(response.getDetail());
JSONObject json=JSONObject.parseObject(response.getContent());
System.out.println(json.toString());
报错
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Stream closed
at org.nutz.lang.Lang.wrapThrow(Lang.java:185)
at org.nutz.lang.Streams.readAndClose(Streams.java:293)
at org.nutz.http.Response.getContent(Response.java:150)
at org.nutz.http.Response.getContent(Response.java:143)
at cn.webro.util.YingshiToken.main(YingshiToken.java:22)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:151)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.Reader.read(Reader.java:140)
at org.nutz.lang.Streams.read(Streams.java:316)
at org.nutz.lang.Streams.read(Streams.java:274)
at org.nutz.lang.Streams.readAndClose(Streams.java:290)
... 3 more