Copy link to clipboard
Copied
Hi Team,
I have written script to connect to https url .This url has authentication .But in my script ,http.authentication method is not getting called.
please help me if nay one have any idea or any alternate to pass this step.
below is the code:
var https = new HttpConnection("URL");
https.method = "POST";
// This piece is for Authentication. Add some additional code to prompt the user to enter their user name and password
https.onAuthentication = function(host, realm, isProxy, retries, currentUser, currentPassword) {
// /*
alert ("onHttpAuthentication CALLED \n" +
"\n host = " + host +
"\n realm = " + realm +
"\n isProxy = " + isProxy +
"\n retries = " + retries +
"\n currentUser = " + currentUser +
"\n currentPassword = " + currentPassword ) ;
// */
this.username = "username" ;
this.password = "pwd" ;
return HttpConnection.actionContinue ;
};
regards,
Venkat
Have something to add?