Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

There is no such type as generic_request_handler_t #206

Open eao197 opened 9 months ago

eao197 commented 9 months ago

There is a type default_request_handler_t: https://github.com/Stiffstream/restinio/blob/4d003e99c6a2fa007d1a58acf32a3e9e7e213b26/dev/restinio/request_handler.hpp#L478-L479 And there is a type generic_request_handle_t: https://github.com/Stiffstream/restinio/blob/4d003e99c6a2fa007d1a58acf32a3e9e7e213b26/dev/restinio/request_handler.hpp#L454-L456

But there is no generic_request_handler_t in a form like:

template<typename ExtraData>
using generic_request_handler_t = std::function<
   request_handling_status_t(generic_reqeuest_handle_t<ExtraData>)>;

Such a type can make usage of ExtraData simpler.