This commit is contained in:
snarmph 2025-10-24 10:58:09 +02:00
parent 5e165c1fad
commit c7291ead23
3 changed files with 19 additions and 8 deletions

View file

@ -1319,7 +1319,7 @@ typedef struct {
strview_t body;
} http_request_desc_t;
typedef void (*http_request_callback_fn)(strview_t chunk, void *udata);
typedef void (*http_request_callback_fn)(http_header_t *headers, strview_t chunk, void *udata);
// arena_t *arena, strview_t url, [ http_header_t *headers, int header_count, strview_t body ]
#define http_get(arena, url, ...) http_request(&(http_request_desc_t){ arena, url, .request_type = HTTP_GET, .version = { 1, 1 }, __VA_ARGS__ })