Configure library-wide settings.
More...
Configure library-wide settings.
◆ fetch_config_t
Global configuration for the fetch library.
◆ fetch_config_default()
Get default configuration.
- Returns
- Default configuration struct
void fetch_global_dispose(void)
Clean up the fetch library.
Definition fetch.c:7620
void fetch_global_init(const fetch_config_t *config)
Initialize the fetch library with configuration.
Definition fetch.c:7519
static fetch_config_t fetch_config_default(void)
Get default configuration.
Definition fetch.h:1885
cookie_jar_t * fetch_create_cookie_jar(const char *persistent_file)
Create a new cookie jar.
Definition fetch.c:8962
void fetch_cookie_jar_free(cookie_jar_t *jar)
Free a cookie jar.
Definition fetch.c:8982
Cookie jar implementation.
Definition cookie.h:184
Global configuration for the fetch library.
Definition fetch.h:1818
const char * user_agent
Definition fetch.h:1819
uint32_t default_timeout_ms
Definition fetch.h:1824
cookie_jar_t * cookie_jar
Definition fetch.h:1822
◆ fetch_config_get_flag()
Get a configuration flag value.
- Parameters
-
flags | Flags bitfield |
bit | Flag to check |
- Returns
- true if flag is set
◆ fetch_config_set_flag()
Set or clear a configuration flag.
- Parameters
-
config | Configuration object |
flag | Flag to modify |
value | true to set, false to clear |
◆ fetch_global_dispose()
void fetch_global_dispose |
( |
void | | ) |
|
Clean up the fetch library.
Stops the event loop and frees all resources. Call this during application shutdown.
- Note
- Memory: Frees all library resources
-
Threading: Must be called from the same thread that initialized the library
◆ fetch_global_init()
Initialize the fetch library with configuration.
- Parameters
-
config | Configuration options (NULL for defaults, borrowed reference) |
- Note
- Memory: Configuration is copied, original can be freed
-
Threading: Must be called before any fetch operations, not thread-safe