summaryrefslogtreecommitdiff
path: root/libs/cpp-httplib/example/hello.cc
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-27 18:38:35 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-27 18:38:35 +0200
commitd8c4d84dc75300c6d4d8b0adceafa33741960b92 (patch)
tree00e2dfcc5c836d62fccff76c862e6ec3b0a74db8 /libs/cpp-httplib/example/hello.cc
parentfa088bb60692ba02d30d39affa9a31d9e2b688e2 (diff)
added http lib, working on AI invoice importing
Diffstat (limited to 'libs/cpp-httplib/example/hello.cc')
-rw-r--r--libs/cpp-httplib/example/hello.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/cpp-httplib/example/hello.cc b/libs/cpp-httplib/example/hello.cc
new file mode 100644
index 0000000..38d25a6
--- /dev/null
+++ b/libs/cpp-httplib/example/hello.cc
@@ -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("0.0.0.0", 8080);
+}