I want to call web service which has basic authentication .
once url get authenticated then want to call particular service
example xyz()
which takes 2 parameter and return a flag .
Please help me ?
Thanks in advance............
I want to call web service which has basic authentication .
once url get authenticated then want to call particular service
example xyz()
which takes 2 parameter and return a flag .
Please help me ?
Thanks in advance............
For basic authentication you have to encode your username and password in service call headers like this:
import mx.utils.Base64Encoder;
private function authAndSend(service:HTTPService):void
{
var encoder:Base64Encoder = new Base64Encoder();
encoder.insertNewLines = false;
encoder.encode("someusername:somepassword");
service.headers = {Authorization:"Basic " + encoder.toString()};
service.send();
}
already discussed at HTTP Basic Authentication with HTTPService Objects in Adobe Flex/AIR