From 8c6632502ff992e80051910451421c55894ed9d8 Mon Sep 17 00:00:00 2001 From: frosty Date: Tue, 17 Mar 2026 12:07:07 -0400 Subject: fix: general readability improvements --- src/Utility/HttpClient.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Utility/HttpClient.h') diff --git a/src/Utility/HttpClient.h b/src/Utility/HttpClient.h index 6eb002c..5eceb83 100644 --- a/src/Utility/HttpClient.h +++ b/src/Utility/HttpClient.h @@ -2,7 +2,9 @@ #define HTTPCLIENT_H #include +#include #include +#include typedef struct { char *memory; @@ -13,4 +15,18 @@ typedef struct { HttpResponse http_get(const char *url, const char *user_agent); void http_response_free(HttpResponse *resp); +typedef xmlDocPtr (*XmlParserFn)(const char *data, size_t size, + const char *url); + +typedef struct { + char *memory; + size_t size; + void *parsed_result; + int success; +} CachedHttpResponse; + +CachedHttpResponse cached_http_get(const char *url, const char *user_agent, + const char *cache_key, time_t cache_ttl, + XmlParserFn parser); + #endif -- cgit v1.2.3