我在review esp-thread-br的web server实现的时候,看到代码里区分了用于gui响应和前端resource的rest api。
Code: Select all
static httpd_uri_t s_resource_handlers[];
static httpd_uri_t s_web_gui_handlers[];
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.max_uri_handlers = (sizeof(s_resource_handlers) + sizeof(s_web_gui_handlers)) / sizeof(httpd_uri_t) + 2;
config.max_resp_headers = (sizeof(s_resource_handlers) + sizeof(s_web_gui_handlers)) / sizeof(httpd_uri_t) + 2;