incubator-flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Coleman <>
Subject HTTPService persistant cookies in AIR
Date Wed, 25 Apr 2012 13:50:32 GMT

Hi List, I have a question about HTTPService, cookies and PHP sessions.

I have years of experience with flex and PHP.  I'm using CakePHP which uses a combination
of cookies and session vars to maintain a login for the user.

I have an AIR app, and I really don't want to use the URLLoader component (which does properly
allow me to set cookies), because it does not give me an AsyncToken.  I need the AsyncToken
to be able to manage my service stack due to requirements of my application.

I do the following and it has NO effect whatsoever:

var service:HTTPService = new HTTPService();
service.headers = {Cookies:"foo=bar"};
service.method = "POST";
service.url = "localhost/foo/foo/foo";  // some url of some json service in my cake app

(I don't need to send a payload because it uses url routing).

I'm using the flex sdk 4.6.

here are my problems:
The cookies simply don't get to the server.  I've put a "var_dump($_COOKIES); die();" in the
first line of my index.php and nothing...The request reaches the server as a GET, which I've
found is a result of having an empty payload.
I know that this list is more for questions on Apache Flex... but I'm curious, is this a behavior
that is fixed in Apache Flex?  Are there known workarounds in Adobe Flex 4.6?  Is there something
I'm doing wrong, or is it as everything I google suggests, that it is a total failure of the
HTTPService object to properly handle headers?
Sincerely,David K. Coleman
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message