Closed nabroyan closed 7 years ago
The correct way to handle different methods is like this:
mux.handle("/hello")
// GET
.get([&](served::response& res, const served::request& req) {
res << "Hello from GET\n";
})
// POST
.post([&](served::response& res, const served::request& req) {
res << "Hello from POST\n";
})
;
That works fine. Thank you very much!
Hello. I'm using served library and I really like it. However, I've encountered with an issue. It is not possible to use same endpoint for different HTTP methods. It seems like the latter registered method replaces the previous one and I get the following error.
A simple code to reproduce the issue
`