bool qCgiResponseSetCookie ( Q_ENTRY request,
const char *  name,
const char *  value,
int  expire,
const char *  path,
const char *  domain,
bool  secure 
)

Set cookie

Parameters:
request a pointer of request structure
name cookie name
value cookie value
expire expire related time in seconds (0 means end of session)
path cookie path (NULL can current path)
domain cookie domain (NULL means current domain)
secure secure flag
Returns:
true in case of success, otherwise returns false
   // Apply cookie in the current domain and directory for 1 day.
   qCgiResponseSetCookie(req, "NAME", "qDecoder", 86400, NULL, NULL, false);

   // Apply cookie to the "/" directory of "*.qdecoder.org" until the
   // browser is closed.
   qCgiResponseSetCookie(req, name, value, 0, "/", ".qdecoder.org", false);

   // As for the followings, cookies will be set up only when security
   // requirements are satisfied.
   qCgiResponseSetCookie(req, name, value, 0, NULL, NULL, true);

Definition at line 75 of file qCgiResponse.c.


Generated on Mon Mar 26 07:00:51 2018 for JSOC_Documentation by  doxygen 1.5.7.1