Hi, im not so understand for this part for httpd_app.c. Can i have more HTTP_GET from the custom_get_httpd_uri_handler custom_post
Shakir555 opened this issue · comments
/* 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;
}
}