Add extra param to http_reply()

This commit is contained in:
cpq
2020-12-17 22:47:55 +00:00
parent 29d31ba919
commit 82a378e519
9 changed files with 47 additions and 40 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
mg_ws_upgrade(c, hm);
} else if (mg_http_match_uri(hm, "/rest")) {
// Serve REST response
mg_http_reply(c, 200, "{\"result\": %d}\n", 123);
mg_http_reply(c, 200, "", "{\"result\": %d}\n", 123);
} else {
// Serve static files
mg_http_serve_dir(c, ev_data, s_web_directory);