class documentation
Simple HTTP Server for MicroPython WiFi Devices
| Method | __del__ |
Close the server and release resources. |
| Method | __init__ |
Initialize the server. |
| Method | add |
Register a new route with its handler. |
| Method | close |
Close the server and client connections. |
| Method | run |
Run the server to accept and handle incoming connections. |
| Method | start |
Start the server on the specified port. |
| Method | webpage |
Generate a basic HTML page. |
| Instance Variable | append |
Undocumented |
| Instance Variable | client |
Undocumented |
| Instance Variable | http |
Undocumented |
| Instance Variable | last |
Undocumented |
| Instance Variable | routes |
Undocumented |
| Instance Variable | server |
Undocumented |
| Instance Variable | view |
Undocumented |
| Property | is |
Check if the server is running. |
Initialize the server.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
appendbool | Whether to append '?' to URLs. Defaults to True. |
Register a new route with its handler.
| Parameters | |
path:str | URL path (e.g. "/custom"). |
handler:callable | Function to handle the route, returning the HTML response as a string. |
method:str | HTTP method (e.g. "GET", "POST"). Defaults to "GET". |
Close the server and client connections.
| Parameters | |
reason:str or None | Log message for the close reason. Defaults to None. |
Start the server on the specified port.
| Parameters | |
port:int | The port to listen on. Defaults to 80. |
| Returns | |
bool | True if the server started, False on failure. |