1 Reply Latest reply on Apr 13, 2010 11:44 PM by Ivan Latysh

    Send credentials to secured webservice

    anu3000 Level 1

      I need to secure my webservice with uid/pwd, FLEX need to access the webservice
      and i am using the following code, still webservice is prompting to provide authentication..
      Can anybody tell me what is wrong here..

              public function onStart():void{
                      var creds:String="admin:password";
                      //var encoder:Base64Encoder = new Base64Encoder();
                      //var encodedCreds:String=encoder.toString();
                     // Alert.show(encodedCreds);

                      var header:Object=new Object();
                      header["Authorization"]= "Basic " + creds;
                      header["Content-Type"] = "application/x-www-form-urlencoded";