incubator-flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Campos <>
Subject Re: HTTPService persistant cookies in AIR
Date Wed, 25 Apr 2012 14:12:31 GMT
Long story short. It is an issue with HTTPService and how it deals with
headers. It swallows them up.

Sorry, but you're going to have to code around this issue.


On Wed, Apr 25, 2012 at 8:50 AM, David Coleman <> wrote:

> 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
> service.send();
> (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

Jonathan Campos

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message