How to provide ntlm authentication while calling any url?
问题 I have a hosted url which authenticates using ntlm (windows Integrated authentication). I am on windows and using java 1.8 URL url = new URL("someUrl"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); // con.setInstanceFollowRedirects(false); con.setRequestProperty("Content-Type", "application/json"); con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { // read response ... in.close(); }else{ System.out