mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-14 19:03:30 +00:00
Changed to take host-name instead of address.
This commit is contained in:
1 parent
c5c1c4d412
commit
3fbd3afb6c
2 files changed
+23
-31
No files matched your search
+2
-6
@@ -23,14 +23,10 @@ int main(void)
|
||||
});
|
||||
|
||||
svr.get("/item/:name", [](Context& cxt) {
|
||||
try {
|
||||
cxt.response.body = cxt.request.params.at("name");
|
||||
} catch (...) {
|
||||
// Error...
|
||||
}
|
||||
cxt.response.body = cxt.request.params.at("name");
|
||||
});
|
||||
|
||||
svr.run("0.0.0.0", 1234);
|
||||
svr.run("localhost", 1234);
|
||||
}
|
||||
|
||||
// vim: et ts=4 sw=4 cin cino={1s ff=unix
|
||||
Reference in new issue
Block a user