Code: Select all
Path path = Paths.get(apiUrl);
URI uri = path.toUri();
HttpURLConnection connection = (HttpURLConnection) uri.toURL().openConnection();
Code: Select all
Path path = Paths.get(apiUrl);
URI uri = path.toUri();
HttpURLConnection connection = (HttpURLConnection) uri.toURL().openConnection();