Skip to content
Jurek Muszyński edited this page Jul 19, 2019 · 4 revisions

bool URI(const char *string)

Description

Compares request URI with string. Excludes leading /. If ended with an asterisk, it will be treated as a wildcard.

Return values

Returns true if request URI matches string, otherwise false.

Example

if ( URI("temp/document.pdf") )
    send_pdf(ci);
else if ( URI("/api/v1/products*") )
    products_rest_api(ci);
Clone this wiki locally