diff --git a/README.md b/README.md index 4bc10505..5512825e 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ HTTP server implements a REST API that returns current time. JSON formatting: static void ev_handler(struct mg_connection *c, int ev, void *ev_data) { if (ev == MG_EV_HTTP_MSG) { struct mg_http_message *hm = (struct mg_http_message *) ev_data; - if (mg_http_match_uri(hm, "/api/time/get")) { + if (mg_match(hm->uri, mg_str("/api/time/get"), NULL)) { mg_http_reply(c, 200, "", "{%m:%lu}\n", MG_ESC("time"), time(NULL)); } else { mg_http_reply(c, 500, "", "{%m:%m}\n", MG_ESC("error"), MG_ESC("Unsupported URI"));