HTTPS Login using Java -
I have a problem logging in to a website via I want to do the same thing but via You can, please use https . Works) for http access is written:
string user = user; String password = psw; String authString = user + ":" + password; Byte [] authEncBytes = Base64.encodeBase64 (authString.getBytes ()); String authStringEnc = new string (authEncBytes); URL Connection Connection = url.openConnection (); Connection.setRequestProperty ("Authority", "Basic" + authStringEnc); Connection.setRequestProperty ("content-type", "app / json"); Connection.setRequestProperty ("Accept", "App / JS"); Connection.connect ();
https . Is this possible?
HttpsURLConnection < P> Checkout sample program
Comments
Post a Comment