From abb1c579d29b3fb61e79601518799beca46609c3 Mon Sep 17 00:00:00 2001 From: turret Date: Sun, 22 Jun 2025 19:15:47 -0500 Subject: net: api changes, data export, ident, an more Move HELLO IDENT functionality into util/net Add ready event in example/hello, grab app id and print info Change http_request family of functions - Remove bufsiz for response code - Remove post input pipe in exchange for simple writebuf Add heartbeat latency ack tracking Add websocket handle close function (dummy function, to be extended upon) Add message for invalid token --- include/dbs/api.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/dbs') diff --git a/include/dbs/api.h b/include/dbs/api.h index d421f08..5d4d4fc 100644 --- a/include/dbs/api.h +++ b/include/dbs/api.h @@ -10,10 +10,12 @@ typedef enum { } HTTPMethod; int http_request(HTTPMethod method, char *url, - struct curl_slist *headers, char *writebuf, size_t bufsiz); + struct curl_slist *headers, char *writebuf, + long *response_code); -int api_request(HTTPMethod method, char * url, - struct curl_slist *headers, char *writebuf, size_t bufsiz); +int api_request(HTTPMethod method, char *url, + struct curl_slist *headers, char *writebuf, + long *response_code); #define http_get(...) http_request(HTTP_GET, __VA_ARGS__) #define http_post(...) http_request(HTTP_POST, __VA_ARGS__) -- cgit v1.2.3