-
Notifications
You must be signed in to change notification settings - Fork 53
REQ
Jurek edited this page Apr 10, 2019
·
12 revisions
Compares the first part of request URI with string. 'First part' means everything until / or ?, for example:
URI | Catched by |
---|---|
/calc?first=2&second=3 |
REQ("calc") |
/customers/123 |
REQ("customers") |
/about.html |
REQ("about.html") |
Returns true if first part of request URI matches string, otherwise false.
// in silgy_app_main
if ( REQ("calc") )
process_calc(ci);
else if ( REQ("about") )
gen_page_about(ci);
else if ( REQ("") )
gen_page_main(ci);
else
RES_STATUS(404);