Bug with version variable in the HTTP req but all it works

multi_plaform
anulax1225 ago%!(EXTRA string=1 year)
parent 3917fd3554
commit 1460cc2eea
  1. 10
      sandbox/server/main.cpp

@ -1,7 +1,7 @@
#include <bakatools.h>
#include <bakanet.h>
#define PORT 80
#define PORT 8080
using namespace Bk::Net;
@ -17,11 +17,11 @@ int main()
res.body = "<p>Coucou de /</p>";
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 = "<p>Coucou de /home/</p>";
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();

Loading…
Cancel
Save