Skip to main content
Participant
July 21, 2015
Question

on authentication method is not calling when https url is used in httpconnection() object.

  • July 21, 2015
  • 0 replies
  • 255 views

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

This topic has been closed for replies.