LWHTTP#
An asynchronous HTTP/1.1 and HTTPS client library for the TI-84 Plus CE, built on lwIP-CE and shipped as a LibLoad library.
Get started · API reference · GitHub
Requests run on lwIP-CE socket events and report through callbacks. One call in your main loop drives everything.
lwhttp_client_request_sync and lwhttp_client_wait wait for you when a program just needs an answer.
https:// URLs use lwIP-CE’s TLS 1.3 stack with SNI and certificate checks against its truststore.
Chunked transfer, trailers, interim responses, keep-alive reuse, redirects, Expect: 100-continue and strict framing rules.
One heap block per client, zero-copy body delivery, no division or 64-bit math on hot paths.
Host unit tests with sanitizers, fuzzing, coverage, CEmu emulator runs and a hardware suite.
At a glance#
static bool on_body(lwhttp_client_t *client, const uint8_t *data, size_t len, void *arg)
{
fwrite(data, 1, len, stdout);
return true;
}
static void on_complete(lwhttp_client_t *client, lwhttp_error_t result, void *arg)
{
*(bool *)arg = true;
}
static const lwhttp_client_handlers_t handlers = {NULL, on_body, on_complete};
lwhttp_client_t *client = lwhttp_client_create(NULL);
lwhttp_request_t request = {0};
bool done = false;
request.url = "https://tls13.akamai.io/";
if (lwhttp_client_request(client, &request, &handlers, &done) == LWHTTP_OK)
while (!done) lwhttp_service_events();
lwhttp_client_t *client = lwhttp_client_create(NULL);
lwhttp_request_t request = {0};
request.url = "https://tls13.akamai.io/";
if (lwhttp_client_request_sync(client, &request, NULL, NULL) == LWHTTP_OK)
printf("HTTP %u\n", lwhttp_client_status(client));