HTTP variable in path
Posted: Tue Jul 05, 2022 2:45 pm
Hi,
Is it possible to parse a variable in the URL path by the uri handler e.g.
POST someurl/control/23
and get ctl_id = 23
if that makes sense...
thanks
Is it possible to parse a variable in the URL path by the uri handler e.g.
POST someurl/control/23
Code: Select all
httpd_uri_t new_uri = {
.uri = "/control/:ctl_id",
.method = HTTP_POST,
.handler = ctl_handler,
.user_ctx = NULL
};
httpd_register_uri_handler(server, &new_uri);
if that makes sense...
thanks