Skip to content
Jurek Muszyński edited this page Mar 28, 2024 · 5 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();
else if ( URI("/api/v1/products*") )
    products_rest_api();
Clone this wiki locally