Hello Tommi,

OK, I used this syntax, but there was no value set for the attribute "expire" in Firebug. With telnet, this value is set.

Perhaps a Firebug bug ?

Jean-Michel

Le 25/12/2013 16:02, Tommi Mäkitalo a écrit :
Am 25.12.2013 00:42, schrieb Jean-Michel Caricand:
Hello,

I want to create a cookie and set his Expire value. I don't manage to
find a solution which works.

Where can I find a example that uses setExpires function.

Thanks,

Jean-Michel

Here:

    if (!request.hasCookie("foo"))
    {
      tnt::Cookie cookie("bar");
      cookie.setExpires("Wed, 25-Dec-14 22:10:00 GMT");
      reply.setCookie("foo", cookie);
    }


reply.setCookie expects a object of type tnt::Cookie. It has a default constructor with a std::string, so that you can pass a string as a cookie and the object is instantiated temporarily. But you can also create a object by hand and add attributes to it.

Tommi


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk


_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to