early-access version 1799
This commit is contained in:
19
externals/cpp-httplib/example/hello.cc
vendored
Executable file
19
externals/cpp-httplib/example/hello.cc
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// hello.cc
|
||||
//
|
||||
// Copyright (c) 2019 Yuji Hirose. All rights reserved.
|
||||
// MIT License
|
||||
//
|
||||
|
||||
#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", 8080);
|
||||
}
|
Reference in New Issue
Block a user