This module implements an embedded HTTP server using libmicrohttpd.
| Parámetro | Tipo | Descripción |
|---|---|---|
| listen_addr | int | 3.2. listen_port (int) 3.3. event_callback (str) |
| listen_port | int | 3.3. event_callback (str) |
| event_callback | str | 3.1. listen_addr (int) |
| listen_addr | int | IPv4 address to listen for HTTP connection. If not set, then it listens on all local addresses (port has to be specified by listen_port parameter). |
| listen_port | int | Port to listen for HTTP connection. |
| event_callback | str | The name of the function in the kemi configuration file (embedded scripting language such as Lua, Python, ...) to be executed instead of event_route[microhttpd:request] block. |
4.1. mhttpd_reply(code, reason, ctype, body)
Send back a reply with content-type and body.
Copyright © 2023 asipto.com