C Collections

chttpserver · Section 3

chttpsvr_req_param

chttpsvr_req_param - look up a named path parameter

C Collections (libccollections, -lccollections)

#include <ccollections/chttpserver.h>
 
const char *chttpsvr_req_param(const chttpsvr_req *req,
                                const char *name);

Returns the URL-decoded value of the path parameter called name.  If
the route pattern that matched has no parameter with that name, the
result is NULL.
 
A parameter captures one raw path segment and that segment is decoded
separately, so the value can hold a '/' that arrived as %2F and it can
also be "." or "..".  Never use it as a file name without checking
it first.

chttpsvr_req_path(3), chttpsvr_req_query(3)