Searched refs:urlConnection (Results 1 – 4 of 4) sorted by relevance
238 HttpURLConnection urlConnection = null;241 urlConnection = (HttpURLConnection) url.openConnection();242 if (urlConnection.getResponseCode() != 200) {244 + urlConnection.getResponseCode());247 new InputStreamReader(urlConnection.getInputStream()));253 if (urlConnection != null) {254 urlConnection.disconnect();
140 HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); in connectToWebsite() local141 try (AutoCloseable ac = () -> urlConnection.disconnect()){ in connectToWebsite()142 urlConnection.setConnectTimeout(2000); in connectToWebsite()143 urlConnection.setReadTimeout(2000); in connectToWebsite()144 urlConnection.getResponseCode(); in connectToWebsite()
57 final HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection(); in makeNetworkRequest() local60 final int status = urlConnection.getResponseCode(); in makeNetworkRequest()66 urlConnection.disconnect(); in makeNetworkRequest()
326 HttpURLConnection urlConnection = null; in connectToWebsite() local329 urlConnection = (HttpURLConnection) url.openConnection(); in connectToWebsite()330 urlConnection.setConnectTimeout(2000); in connectToWebsite()331 urlConnection.setReadTimeout(2000); in connectToWebsite()332 urlConnection.getResponseCode(); in connectToWebsite()336 if (urlConnection != null) { in connectToWebsite()337 urlConnection.disconnect(); in connectToWebsite()