Renamed Context to Connection. Removed DSL macro.
This commit is contained in:
parent
6897c64c74
commit
ced9c38339
5 changed files with 53 additions and 57 deletions
|
@ -6,14 +6,17 @@
|
|||
//
|
||||
|
||||
#include <httplib.h>
|
||||
using namespace httplib;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
HTTP_SERVER("localhost", 1234) /* svr_ */ {
|
||||
GET("/hi", /* req_, res_ */ {
|
||||
res_.set_content("Hello World!");
|
||||
});
|
||||
}
|
||||
Server svr("localhost", 1234);
|
||||
|
||||
svr.get("/hi", [](Connection& c) {
|
||||
c.response.set_content("Hello World!");
|
||||
});
|
||||
|
||||
svr.run();
|
||||
}
|
||||
|
||||
// vim: et ts=4 sw=4 cin cino={1s ff=unix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue