1
0
mirror of synced 2025-04-19 00:24:02 +03:00
cpp-httplib/example/hello.cc
2019-05-07 21:46:15 -04:00

20 lines
349 B
C++

//
// hello.cc
//
// Copyright (c) 2012 Yuji Hirose. All rights reserved.
// The Boost Software License 1.0
//
#include <httplib.h>
using namespace httplib;
int main(void) {
Server svr;
svr.Get("/hi", [](const Request & /*req*/, Response &res) {
res.set_content("Hello World!", "text/plain");
});
svr.listen("localhost", 1234);
}