|
CppCMS
|
Class that represents single HTTP Cookie Generally used in context of http::request and http::response. More...
#include <cppcms/http_cookie.h>
Public Member Functions | |
| std::string | name () const |
| std::string | value () const |
| std::string | path () const |
| std::string | domain () const |
| std::string | comment () const |
| bool | secure () const |
| void | name (std::string n) |
| void | value (std::string v) |
| void | path (std::string p) |
| void | domain (std::string) |
| void | comment (std::string) |
| void | expires (time_t when) |
| time_t | expires () const |
| bool | expires_defined () const |
| void | max_age (unsigned age) |
| unsigned | max_age () const |
| bool | max_age_defined () const |
| void | browser_age () |
| void | secure (bool v) |
| bool | httponly () const |
| void | httponly (bool v) |
| bool | samesite_none () const |
| bool | samesite_lax () const |
| bool | samesite_strict () const |
| void | samesite_none (bool v) |
| void | samesite_lax (bool v) |
| void | samesite_strict (bool v) |
| bool | empty () const |
| cookie (cookie const &) | |
| cookie (cookie &&) | |
| cookie const & | operator= (cookie const &) |
| cookie & | operator= (cookie &&) |
| cookie (std::string name, std::string value) | |
| cookie (std::string name, std::string value, unsigned age) | |
| cookie (std::string name, std::string value, unsigned age, std::string path, std::string domain=std::string(), std::string comment=std::string()) | |
| cookie (std::string name, std::string value, std::string path, std::string domain=std::string(), std::string comment=std::string()) | |
| Create cookie with name, value, path, domain and comment, age - browser. | |
Friends | |
| std::ostream & | operator<< (std::ostream &, cookie const &) |
Class that represents single HTTP Cookie Generally used in context of http::request and http::response.
| cppcms::http::cookie::cookie | ( | std::string | name, |
| std::string | value | ||
| ) |
Create cookie with name and value, age - browser, rest properties undefined.
| cppcms::http::cookie::cookie | ( | std::string | name, |
| std::string | value, | ||
| unsigned | age | ||
| ) |
Create cookies with name, value and max-age, rest properties undefined.
| cppcms::http::cookie::cookie | ( | std::string | name, |
| std::string | value, | ||
| unsigned | age, | ||
| std::string | path, | ||
| std::string | domain = std::string(), |
||
| std::string | comment = std::string() |
||
| ) |
Create cookie with name, value, max-age, path, domain and command
| void cppcms::http::cookie::browser_age | ( | ) |
Set age according to browser's session (i.e. no Max-Age)
| std::string cppcms::http::cookie::comment | ( | ) | const |
Cookie's comment
| void cppcms::http::cookie::comment | ( | std::string | ) |
Set cookie's comment
| std::string cppcms::http::cookie::domain | ( | ) | const |
Cookie's domain
| void cppcms::http::cookie::domain | ( | std::string | ) |
Set cookie's domain
| bool cppcms::http::cookie::empty | ( | ) | const |
Check if cookie is not assigned - empty
| void cppcms::http::cookie::expires | ( | time_t | when | ) |
Set expiration date/time
| time_t cppcms::http::cookie::expires | ( | ) | const |
Returns expires timestamp for the cookie, if not set returns 0
| bool cppcms::http::cookie::expires_defined | ( | ) | const |
returns true if expires(time_t when) was called and expiration was set, if browser_age() is called it is reset to false
| bool cppcms::http::cookie::httponly | ( | ) | const |
Check if the httponly propertie is set on the cookies
| void cppcms::http::cookie::httponly | ( | bool | v | ) |
Set httponly property on the cookies
| void cppcms::http::cookie::max_age | ( | unsigned | age | ) |
Set max cookie's age
| unsigned cppcms::http::cookie::max_age | ( | ) | const |
Get max cookie's age, returns 0 if not set
| bool cppcms::http::cookie::max_age_defined | ( | ) | const |
returns true if max(unsigned age) was called and max_age was set, if browser_age() is called it is reset to false
| std::string cppcms::http::cookie::name | ( | ) | const |
Cookie's Name
| void cppcms::http::cookie::name | ( | std::string | n | ) |
Set cookie's name
| std::string cppcms::http::cookie::path | ( | ) | const |
Cookie's path
| void cppcms::http::cookie::path | ( | std::string | p | ) |
Set cookie's path
| bool cppcms::http::cookie::samesite_none | ( | ) | const |
Check if one of the samesite properties is set on the cookies
| void cppcms::http::cookie::samesite_none | ( | bool | v | ) |
Set one of the samesite properties on the cookies
| bool cppcms::http::cookie::secure | ( | ) | const |
Check if the cookie is transferred over secure connection only
| void cppcms::http::cookie::secure | ( | bool | v | ) |
Set secure property on the cookies
| std::string cppcms::http::cookie::value | ( | ) | const |
Cookie's value
| void cppcms::http::cookie::value | ( | std::string | v | ) |
Set cookie's value
1.8.11