libfetch 0.0.0
A lightweight asynchronous HTTP/1.1 client library implementing a subset of the WHATWG Fetch API.
Loading...
Searching...
No Matches
Convenience Macros

Shortcuts for common cookie operations. More...

Macros

#define COOKIE_IS_VALID_FOR_HTTP(cookie)
 Check if cookie is valid for HTTP requests.
 
#define COOKIE_IS_VALID_FOR_HTTPS(cookie)
 Check if cookie is valid for HTTPS requests.
 

Detailed Description

Shortcuts for common cookie operations.

Macro Definition Documentation

◆ COOKIE_IS_VALID_FOR_HTTP

#define COOKIE_IS_VALID_FOR_HTTP ( cookie)
Value:
((cookie) != NULL && !cookie_is_expired((cookie), time(NULL)))
HTTP cookie structure.
Definition cookie.h:105

Check if cookie is valid for HTTP requests.

Parameters
cookieCookie to check
Returns
True if cookie is valid and not expired

◆ COOKIE_IS_VALID_FOR_HTTPS

#define COOKIE_IS_VALID_FOR_HTTPS ( cookie)
Value:

Check if cookie is valid for HTTPS requests.

Parameters
cookieCookie to check
Returns
True if cookie is valid for HTTPS

Note: Secure cookies can only be sent over HTTPS, but non-secure cookies can be sent over both HTTP and HTTPS.