cpp-httplib
cpp-httplib copied to clipboard
Server Handlers update
Hi,
I'm currently using the library (v0.16.0) and I've discovered that after defining a handler for example for Get. We can't update it after. This is due to the usage for emplace_back putting in the vector list the new pair<pattern,handler> :
inline Server &Server::Get(const std::string &pattern, Handler handler) {
get_handlers_.emplace_back(make_matcher(pattern), std::move(handler));
return *this;
}
Does it makes sense to allow redefining the handler after first definition ?
Regards
There is no v0.16.0 available, yet...