-
Notifications
You must be signed in to change notification settings - Fork 10
chl_cookies
it4e edited this page Mar 21, 2016
·
3 revisions
<chl/chl.h>
chl_cookies, CHL cookies
char * chl_cookies(char * name);
The chl_cookies function is used to get the value associated with the cookie [name].
- name: the name of the cookie.
A char pointer to the string value of cookie. 0 if cookie is not found.
main.c
#include <chl/chl.h>
#include <stdio.h>
int main() {
chl_set_cookie("name", "Olof", NULL);
chl_print_headers();
char * value;
if((value = chl_cookies("name")))
fputs(value, stdout);
}
Output: Olof