send_html()
send_html()
is a macro for sending text/html
responses easily. It runs reply() function under the hood.
#include "ecewo.h"
void hello_world(Req *req, Res *res){ const char *html = "<!DOCTYPE html>" "<html lang=\"en\">" "<head><meta charset=\"UTF-8\"><title>Hello</title></head>" "<body><h1>Hello, world!</h1></body>" "</html>";
send_html(200, html);}