- 如何从 AIR 应用程序打开并保持与特定 Web 服务器的会话?
到目前为止,我尝试过这种方式,但没有运气:
var qHeader : URLRequestHeader = new URLRequestHeader();
var urlRequest : URLRequest = new URLRequest( requestTarget.text );
urlRequest.method = URLRequestMethod.POST;
urlRequest.data = cookiesObject;
//urlRequest.requestHeaders.push( qHeader );
urlRequest.requestHeaders = new Array( "Cookie: ASP.NET_SessionId=u43mjnpuerdicmu5pjobi2dz" )
var rr : Response = new Response();
//URLRequestDefaults.manageCookies = true;
var _urlLoader : URLLoader = new URLLoader();
_urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
_urlLoader.addEventListener( Event.COMPLETE, onReceive );
_urlLoader.addEventListener( IOErrorEvent.IO_ERROR, onFail );
_urlLoader.load( urlRequest );