Closed Shakir555 closed 9 months ago
/ function pointers to URI handlers that can be user made / esp_err_t (custom_get_httpd_uri_handler)(httpd_req_t r) = NULL; esp_err_t (custom_post_httpd_uri_handler)(httpd_req_t r) = NULL;
esp_err_t http_app_set_handler_hook( httpd_method_t method, esp_err_t (handler)(httpd_req_t r) ){
if(method == HTTP_GET){ custom_get_httpd_uri_handler = handler; return ESP_OK; } else if(method == HTTP_POST){ custom_post_httpd_uri_handler = handler; return ESP_OK; } else{ return ESP_ERR_INVALID_ARG; }
}
/ function pointers to URI handlers that can be user made / esp_err_t (custom_get_httpd_uri_handler)(httpd_req_t r) = NULL; esp_err_t (custom_post_httpd_uri_handler)(httpd_req_t r) = NULL;
esp_err_t http_app_set_handler_hook( httpd_method_t method, esp_err_t (handler)(httpd_req_t r) ){
}