Add a client example program and move examples to the examples/ folder

This commit is contained in:
2025-11-22 00:13:43 +01:00
parent eec1174047
commit 4ca5b67d8e
8 changed files with 80 additions and 17 deletions
+4 -4
View File
@@ -422,12 +422,12 @@ bool http_client_next_response(HTTP_Client *client,
return true;
}
void http_free_response(HTTP_Response *res)
void http_free_response(HTTP_Response *response)
{
if (res == NULL || res->context == NULL)
if (response == NULL || response->context == NULL)
return;
HTTP_ClientConn *conn = (HTTP_ClientConn*) res->context;
HTTP_ClientConn *conn = (HTTP_ClientConn*) response->context;
// Free the connection resources
http_client_conn_free(conn);
@@ -435,5 +435,5 @@ void http_free_response(HTTP_Response *res)
conn->client->num_conns--;
// Mark response as freed
res->context = NULL;
response->context = NULL;
}
+1 -1
View File
@@ -151,4 +151,4 @@ bool http_client_next_response(HTTP_Client *client,
// Free a response object. You can't access its fields
// again after this.
void http_free_response(HTTP_Response *res);
void http_free_response(HTTP_Response *response);