Skip to content

Commit

Permalink
option support (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
abushev authored Dec 17, 2024
1 parent e347489 commit 2f56bce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRUD/handlers/crud_matcher_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ namespace http::crud {
_handlers["PUT"] = handler;
return *this;
}
crud_matcher_base & option(request_handler_type handler) {
_handlers["OPTION"] = handler;
return *this;
}
template<typename Request, typename Matched>
void handle_request(const Request& request, Response& response, Matched const& what) {
auto &handler = _handlers[request.method];
Expand Down

0 comments on commit 2f56bce

Please sign in to comment.