mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Added the hello world sample to README.md.
This commit is contained in:
parent
181d642238
commit
bad43c66d7
2 changed files with 18 additions and 11 deletions
|
@ -10,16 +10,8 @@
|
|||
int main(void)
|
||||
{
|
||||
HTTP_SERVER("localhost", 1234) {
|
||||
|
||||
// const httpsvrkit::Request& req
|
||||
// httpsvrkit::Response& res
|
||||
|
||||
GET("/hello", {
|
||||
res.set_content("world");
|
||||
});
|
||||
|
||||
GET("/url", {
|
||||
res.set_content(req.url);
|
||||
GET("/hi", {
|
||||
res.set_content("Hello World!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue