Add simplified client API (http_get, http_put, http_post, http_delete)

This commit is contained in:
2025-11-27 09:50:41 +01:00
parent 6a9ba6bbf4
commit 1ef6187b2d
6 changed files with 206 additions and 28 deletions
+18
View File
@@ -1058,6 +1058,24 @@ void http_client_wait_response(HTTP_Client *client,
// again after this.
void http_free_response(HTTP_Response *response);
// Perform a blocking GET request
int http_get(HTTP_String url, HTTP_String *headers,
int num_headers, HTTP_Response **response);
// Perform a blocking POST request
int http_post(HTTP_String url, HTTP_String *headers,
int num_headers, HTTP_String body,
HTTP_Response **response);
// Perform a blocking PUT request
int http_put(HTTP_String url, HTTP_String *headers,
int num_headers, HTTP_String body,
HTTP_Response **response);
// Perform a blocking DELETE request
int http_delete(HTTP_String url, HTTP_String *headers,
int num_headers, HTTP_Response **response);
////////////////////////////////////////////////////////////////////////////////////////
// src/server.h
////////////////////////////////////////////////////////////////////////////////////////