I'd like to create a Flex2 app that can access a REST API using Basic HTTP Authentication.
I'm using the latest beta. So, here's my test code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*" layout="absolute" backgroundColor="#ffffff" creationComplete="httpService.setCredentials('[EMAIL PROTECTED]', 'password');httpService.send();"> <mx:HTTPService id="httpService" url="http://www.aviflax.com/feed" useProxy="false" resultFormat="text"/> <mx:Text id="text1" x="0" y="0" width="100%" height="100%" text="{httpService.result.toString()}"/> </mx:Application> If I remove the setCredentials() call, it works fine. If I add it, then the send() method throws this error: TypeError: Error #1034: Type Coercion failed: cannot convert C:\dev\enterprise_beta1\frameworks\libs\framework.swc(mx/core/mx_internal)$34::[EMAIL PROTECTED] to C:\dev\enterprise_beta1\frameworks\libs\framework.swc(mx/validators/Validator)$132.DirectHTTPMessageResponder at mx.messaging.channels::DirectHTTPChannel/mx.messaging.channels:DirectHTTPChannel::internalSend() at mx.messaging::Channel/setCredentials() at mx.messaging::ChannelSet/setCredentials() at mx.messaging::MessageAgent/set channelSet() at mx.rpc.http::HTTPService/send() at mx.rpc.http.mxml::HTTPService/send() at pxQuoteClientMockup/___Application1_creationComplete() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/mx.core:UIComponent::dispatchCreationCompleteEvent() at mx.core::UIComponent$/http://www.macromedia.com/2005/flex/mx/internal::dispatchCreationCompleteEvents() at mx.managers::LayoutManager/mx.managers:LayoutManager::doPhasedInstantiation() at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher2() at mx.core::UIComponent/mx.core:UIComponent::callLaterDispatcher() I posted at the Adobe Labs Forums but (as usual) got no helpful answers - just a confirmation from someone else having the same problem: http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=584&threadid=1113869 Help! Thanks, Avi Flax Arc 90 New York -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/