Closed yuanzhe08 closed 6 years ago
JSONObject json = new JSONObject(res.getBodyStr());
上面代码 由于响应头 Content-type 大小写问题,合成成功,返回Data数据,res.getBodyStr() 明显为null,却用 JsonExeception 异常来捕获,导致空指针问题抛出。
跟踪了下,发现响应头为null
JSONObject json = new JSONObject(res.getBodyStr());
上面代码 由于响应头 Content-type 大小写问题,合成成功,返回Data数据,res.getBodyStr() 明显为null,却用 JsonExeception 异常来捕获,导致空指针问题抛出。