AB
Size: a a a
AB
IL
CC
AZ
AZ
AZ
AZ
CC
AZ
CC
AZ
CC
CC
router->http_get(
R"(/data/meter/:meter_id(\d+))",
[](auto req, auto params) {
const auto qp = parse_query(req->header().query());
return req->create_response()
.set_body(
fmt::format("meter_id={} (year={}/mon={}/day={})",
cast_to<int>(params["meter_id"]),
opt_value<int>(qp, "year"),
opt_value<int>(qp, "mon"),
opt_value<int>(qp, "day")))
.done();
});
router->non_matched_request_handler(
[](auto req){
return req->create_response(restinio::status_not_found()).connection_close().done();
});
AZ
AZ
AZ
AZ
CC
AZ
AZ