File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ namespace crow
279279
280280// clang-format off
281281#ifndef CROW_MSVC_WORKAROUND
282- constexpr crow::HTTPMethod operator " " _method (const char * str, size_t /* len */ )
282+ constexpr crow::HTTPMethod method_from_string (const char * str)
283283{
284284 return crow::black_magic::is_equ_p (str, " GET" , 3 ) ? crow::HTTPMethod::Get :
285285 crow::black_magic::is_equ_p (str, " DELETE" , 6 ) ? crow::HTTPMethod::Delete :
@@ -324,5 +324,10 @@ constexpr crow::HTTPMethod operator"" _method(const char* str, size_t /*len*/)
324324 crow::black_magic::is_equ_p (str, " SOURCE" , 6 ) ? crow::HTTPMethod::Source :
325325 throw std::runtime_error (" invalid http method" );
326326}
327+
328+ constexpr crow::HTTPMethod operator " " _method(const char * str, size_t /* len*/ )
329+ {
330+ return method_from_string ( str );
331+ }
327332#endif
328333// clang-format on
You can’t perform that action at this time.
0 commit comments