mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-27 12:49:01 +08:00
Better MIP description
This commit is contained in:
parent
03284ba046
commit
c25234df83
@ -20,8 +20,12 @@ robust, and easy. Features include:
|
||||
- Tiny static and run-time footprint
|
||||
- Source code is both ISO C and ISO C++ compliant
|
||||
- Works with any network stack with socket API, like LwIP or FreeRTOS-Plus-TCP
|
||||
- Optional [built-in IP stack](mip) for bare metal or RTOS-enabled applications
|
||||
- Very easy to integrate: just copy `mongoose.c` and `mongoose.h` files to your build tree
|
||||
- Optional built-in TCP/IP stack with drivers for bare metal or RTOS firmwares
|
||||
- A full device dashboard
|
||||
[bare metal example on Nucleo-F429ZI](examples/stm32/nucleo-f429zi-baremetal)
|
||||
is only 6 files
|
||||
- For comparison, a CubeIDE generated HTTP example is 400+ files
|
||||
- Detailed [documentation](https://mongoose.ws/documentation/) and
|
||||
[tutorials](https://mongoose.ws/tutorials/)
|
||||
|
||||
|
@ -170,6 +170,10 @@ void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
|
||||
// u ? u->name : "NULL"));
|
||||
if (mg_http_match_uri(hm, "/api/hi")) {
|
||||
mg_http_reply(c, 200, "", "hi\n"); // Testing endpoint
|
||||
} else if (mg_http_match_uri(hm, "/api/debug")) {
|
||||
int level = mg_json_get_long(hm->body, "$.level", MG_LL_DEBUG);
|
||||
mg_log_set(level);
|
||||
mg_http_reply(c, 200, "", "Debug level set to %d\n", level);
|
||||
} else if (u == NULL && mg_http_match_uri(hm, "/api/#")) {
|
||||
// All URIs starting with /api/ must be authenticated
|
||||
mg_http_reply(c, 403, "", "Denied\n");
|
||||
|
Loading…
Reference in New Issue
Block a user