Expand description
Channel-based bridge allowing synchronous HTTP calls from Wasmtime host function runtime::host_api::http.
Due to potenial memory corruption issues with multiple EspHttpClient instances, all http request are processed by http_handler_task even for async functions.
Core 1 (widget) Core 0 (embassy)
─────────────── ────────────────
http_request_sync() ──► HTTP_REQUEST_CHANNEL
polls with 10ms http_handler_task() dequeues
RTOS yields ◄── HTTP_RESPONSE_CHANNELTimeout on both sides: 30 seconds.
Structs§
- Http
Request - An HTTP request queued from the synchronous widget side to the async handler.
Constants§
Statics§
Functions§
- http_
handler_ task - Async task that handles HTTP requests from the channel Run on Core 0.
- http_
request_ async - Asynchronous HTTP request function callable from async context.
- http_
request_ sync - Synchronous HTTP request function called from WIT host functions Widget execution is halted until this function returns or times out.