From 1460cc2eea00e43e2d8d7f923acc3ebfe8279e4f Mon Sep 17 00:00:00 2001 From: anulax1225 Date: Fri, 26 Apr 2024 10:33:57 +0200 Subject: [PATCH] Bug with version variable in the HTTP req but all it works --- sandbox/server/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sandbox/server/main.cpp b/sandbox/server/main.cpp index b9df27a..7ce5742 100755 --- a/sandbox/server/main.cpp +++ b/sandbox/server/main.cpp @@ -1,7 +1,7 @@ #include #include -#define PORT 80 +#define PORT 8080 using namespace Bk::Net; @@ -17,11 +17,11 @@ int main() res.body = "

Coucou de /

"; return res; }); - server.get("/home/", [](HttpRequest& req) + server.post("/home/", [](HttpRequest& req) { - BK_INFO("URL /home"); - HttpReponse res(HTTP_RES_200, req.version); - res.body = "

Coucou de /home/

"; + HttpReponse res(HTTP_RES_200, "HTTP/1.1"); + res.body = "Success"; + BK_INFO("\n{0}\n{1}", req.body, res.to_string()); return res; }); server.start();