This is a topic in Basecamp API

API and Flex

 
Avatar flayoo 2 posts

Hi,
how can I use the API with Flex?

I tried URLLoader with the Header

var code:String = baseCampUser + ":" + baseCampPassword;
code = Base64.Encode(code);
var header1:URLRequestHeader = new URLRequestHeader("Content-Type", "application/xml");
var header2:URLRequestHeader = new URLRequestHeader("Authorization", "Basic " + code);
var request:URLRequest = new URLRequest(requestURL);
request.contentType = "application/xml";
request.authenticate = true;
request.requestHeaders.push(header1);    
 request.requestHeaders.push(header2);

But this doesn´t work :(

 
Avatar PeterRust 63 posts

flayoo,

I found this information, looks like he’s doing something similar to what you’re doing. At first glance, it looks like the .authenticate = true is only available for AIR, not the flash player (and therefore, not FLEX?)

 
Avatar flayoo 2 posts

There is a problem with the Autorization Header
http://blog.simb.net/2008/01/17/urlrequestheader-in-as3-can-not-use-authorization-header/
http://blog.simb.net/2008/03/18/april-flash-player-updates/

Signup or login to post a reply.