MCPcopy Create free account
hub / github.com/CrowCpp/Crow / ThirdMW

Class ThirdMW

tests/unittest.cpp:892–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890
891template<bool Local>
892struct ThirdMW : public std::conditional<Local, crow::ILocalMiddleware, empty_type>::type
893{
894 struct context
895 {};
896 template<typename AllContext>
897 void before_handle(request&, response&, context&, AllContext& all_ctx)
898 {
899 all_ctx.template get<FirstMW<Local>>().v.push_back("3 before");
900 }
901
902 template<typename AllContext>
903 void after_handle(request&, response&, context&, AllContext& all_ctx)
904 {
905 all_ctx.template get<FirstMW<Local>>().v.push_back("3 after");
906 }
907};
908
909TEST_CASE("middleware_context")
910{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected