| 10 | }; |
| 11 | |
| 12 | struct ExampleMiddleware |
| 13 | { |
| 14 | std::string message; |
| 15 | |
| 16 | ExampleMiddleware(): |
| 17 | message("foo") |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | void setMessage(const std::string& newMsg) |
| 22 | { |
| 23 | message = newMsg; |
| 24 | } |
| 25 | |
| 26 | struct context |
| 27 | {}; |
| 28 | |
| 29 | void before_handle(crow::request& req, crow::response& res, context& ctx) |
| 30 | { |
| 31 | CROW_LOG_DEBUG << " - MESSAGE: " << message; |
| 32 | } |
| 33 | |
| 34 | void after_handle(crow::request& req, crow::response& res, context& ctx) |
| 35 | { |
| 36 | // no-op |
| 37 | } |
| 38 | }; |
| 39 | |
| 40 | int main() |
| 41 | { |
nothing calls this directly
no outgoing calls
no test coverage detected