Hi, I am not able to send query parameters. I tried this:
mux.handle("api/moveby/{x}")
.post([](served::response & res, const served::request & req) {
std::string x = req.params["x"]; // gets x from path
std::string y = req.query["y"]; // gets nothing
}
I am using curl:
curl -d y=2 localhost:8080/api/moveby/1
No matter what I do I can't retrieve it. And I don't really want to use path params.
Hi, I am not able to send query parameters. I tried this:
I am using curl:
curl -d y=2 localhost:8080/api/moveby/1No matter what I do I can't retrieve it. And I don't really want to use path params.