send_text()
send_text()
is for sending text/plain
responses easily. It runs reply() function under the hood.
static inline void send_text(Res *res, int status, const char *body){ reply(res, status, "text/plain", body, strlen(body));}
Example usage:
#include "ecewo.h"
void hello_world(Req *req, Res *res){ send_text(res, 200, "hello world!");}