mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-14 16:58:30 +00:00
Refactoring.
This commit is contained in:
parent
aa75fbb5f9
commit
ffde8b7e4b
3 changed files with 84 additions and 54 deletions
|
@ -89,8 +89,7 @@ int main(void)
|
|||
svr.set_error_handler([](httplib::Connection& c) {
|
||||
char buf[BUFSIZ];
|
||||
snprintf(buf, sizeof(buf), "<p>Error Status: <span style='color:red;'>%d</span></p>", c.response.status);
|
||||
c.response.body = buf;
|
||||
c.response.set_header("Content-Type", "text/html");
|
||||
c.response.set_content(buf, "text/html");
|
||||
});
|
||||
|
||||
svr.set_logger([](const Connection& c) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue