CRequest::getCookies

The CRequest::getCookies function retrieves all cookies.

int getCookies(
CCookie ** cookies // array of cookies
);



Return Type

int
Upon successful completion, the number of cookies actually retrieved is returned. Otherwise, a negative value is returned.


Parameters

cookies
A pointer to an array of CCookie objects which contains the retrieved cookies.


Remarks

This function retrieves all cookies. The CRequest::getCookie function can get a cookies by its name. The CResponse::addCookie function adds a cookie to a client.


Differences Between Ch-CGI and Ch-ASP

In Ch-ASP, the cookies added by CResponse::addCookie can be retrieved by getCookies() or CRequest::getCookie in the same program. In Ch-CGI, the cookies added by CResponse::addCookie cannot be retrieved by getCookies() or CRequest::getCookie in the same program.

See Also

CRequest, CResponse::addCookie, CRequest::getCookie

Example