void execute(const Request& request, Response& response) { auto component = request.get_component(); auto switch_identifier = request.get_switch_id(); if (component != m_component || switch_identifier != m_switch_identifier) { throw exception::NotFound(); } for (std::uint32_t i = 0; i < 10; ++i) { response.add_switch_id(std::to_string(i)); } }
void execute(const Request&, Response& response) { response.add_switch_id("Switch1"); response.add_switch_id("Switch2"); }