String newurl = urlconnectiom.getHeaderField("location"); URL u = new URL(newurl); HttpURLConnection uconnec= (HttpURLConnection) u.openConnection(); uconnec.setRequestMethod("GET"); uconnec.setConnectTimeout(5000); uconnec.setConnectTimeout(5000); if(uconnec.getResponseCode()==200){ InputStream input = uconnec.getInputStream(); s=InputStreamtoString.tostring(input); return s; }
异步请求
最新推荐文章于 2024-01-21 22:41:21 发布