title: Set cookies in Flex URLRequest
body: <p>I'm trying to set a cookie in a Flex, but it doesn't seem to work.  Am I doing something wrong?  Is this possible?  It seems like this should be simple.</p>
  
  <pre><code>var fileRef:FileReference;
  // fileRef is configured
  
  var cookieString:String = "my cookies";
  var cookieHeader:URLRequestHeader= new URLRequestHeader("Cookie", cookieString);
  
  var url:String = 'my url'; 
  var request:URLRequest = new URLRequest(url); 
  request.method = URLRequestMethod.POST; 
  request.requestHeaders.push(cookieHeader);
  fileRef.upload(request);
  </code></pre>
  
  <p>The problem I'm trying to solve is, I cannot make a authenticated web service request through OpenAm without using cookies, and I cannot figure out how to place the cookies in the Flex file upload request (well actually this works in IE, but is broken in Firefox and Chrome - <a href="http://jimmyflex.blogspot.com/2010/05/fixing-file-upload-session-issue-with.html" rel="nofollow">I read that this is because IE uploads the file in the same browser thread while some other browsers spawn a new thread, and the cookie information does not get passed along</a>). </p>