https://github.com/icholy/cookies.c
https://github.com/icholy/cookies.c
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/icholy/cookies.c
- Owner: icholy
- Created: 2015-11-20T19:10:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-21T18:09:42.000Z (over 9 years ago)
- Last Synced: 2025-01-30T03:13:17.381Z (5 months ago)
- Language: C
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cookie Parser
> header only C library for parsing cookies from request headers.
Usage Example:
``` c
#include
#include "cookies.h"const char *cookies = "__utmc=1; logged_in=yes; tz=America%2FNew_York";
int main(void) {
// parse an individual cookie's value
char *value = cookies_lookup(cookies, "logged_in");
if (value) {
printf("Logged In: %s\n", value);
}
free(value);
}
```