HttpAddCookie


HTTP_API int HttpAddCookie ( HttpConnection hConn , const char *pCookie , const char *pValue , const char *pPath , const char *pDomain , unsigned uMaxAge )




 
Inserts a cookie at the next response.

 
hConn pointer to the connection data
 
pCookie is the name of the cookie
 
pValue is the value of the cookie (don't use ";=%\r\n" in the string)
 
pPath is the path to which the cookie belongs (0 means the current path)
 
pDomain is the domain to which the cookie belongs (0 means the current domain)
 
uMaxAge is the maximum age of the cookie in seconds (0 means infinite)
 

Returns the cookie length if the cookie was added or 0 if the buffer was too small to.
 

 




 

see also:

AzHttp Overview | HttpGetCookie | HttpGetCookieValue | HttpGetCookies