The cookie object provides a set of methods to handle HTTP cookies
Usage
cookie->method(...);
Compares a cookie value with the given string
Prototype
int cmp(duda_request_t *dr, char *key, char *cmp);Parameters
It destroy a cookie. This method tells the HTTP client to invalidate the cookie setting up a new expire time based in a past date. The changes should take effect in the next request.
Prototype
int destroy(duda_request_t *dr, char *key, int key_len);Parameters
Retrieve a specific cookie value sent by the HTTP client.
Prototype
int get(duda_request_t *dr, char *key, char **val, int *val_len);Parameters
It creates a new cookie
Prototype
int set(duda_request_t *dr, char *key, int key_len, char *val, int val_len, int expires);Parameters