Fix HTTP request creation and simple client example

This commit is contained in:
2025-11-23 23:27:08 +01:00
parent 3c0aecb5f0
commit f6b2c805c6
4 changed files with 41 additions and 11 deletions
+5
View File
@@ -48,12 +48,17 @@ int main(void)
if (http_client_process_events(&client, &reg) < 0)
return -1;
bool done = false;
HTTP_Response *response;
void *user;
while (http_client_next_response(&client, &response, &user)) {
printf("Received response\n");
http_free_response(response);
done = true;
}
if (done) break;
}
http_client_free(&client);