标签:
今天调试网络请求部分时,当getInputStream失败时直接抛出异常。解决方法时在getInputStream之前获取ResponseCode
if( connection.getResponseCode() != HttpURLConnection.HTTP_OK) return null;
Java网络请求getInputStream异常
原文地址:http://www.cnblogs.com/inbase/p/4449824.html