From e4c6ac201926e9dceb867a1003cdddd896ed100a Mon Sep 17 00:00:00 2001 From: Jae-Sung Lee <39658806+jaesung9507@users.noreply.github.com> Date: Fri, 23 Jul 2021 10:50:57 +0900 Subject: [PATCH 1/2] Update atomizes.hpp function MessageMethodToString add default --- include/atomizes.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/atomizes.hpp b/include/atomizes.hpp index 1a6a716..d6ca8e7 100644 --- a/include/atomizes.hpp +++ b/include/atomizes.hpp @@ -74,8 +74,6 @@ namespace atomizes { switch (method) { - case MessageMethod::NONE: - return "NONE"; case MessageMethod::GET: return "GET"; case MessageMethod::HEAD: @@ -92,6 +90,9 @@ namespace atomizes return "TRACE"; case MessageMethod::PATCH: return "PATCH"; + case MessageMethod::NONE: + default: + return "NONE"; } } From df36236469f4e9919114f652ce7a768405050516 Mon Sep 17 00:00:00 2001 From: Jae-Sung Lee <39658806+jaesung9507@users.noreply.github.com> Date: Tue, 12 Oct 2021 18:02:23 +0900 Subject: [PATCH 2/2] Add OPTIONS Method --- include/atomizes.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/atomizes.hpp b/include/atomizes.hpp index d6ca8e7..f2d8c41 100644 --- a/include/atomizes.hpp +++ b/include/atomizes.hpp @@ -64,7 +64,8 @@ namespace atomizes DELETE, CONNECT, TRACE, - PATCH + PATCH, + OPTIONS }; /** @@ -90,6 +91,8 @@ namespace atomizes return "TRACE"; case MessageMethod::PATCH: return "PATCH"; + case MessageMethod::OPTIONS: + return "OPTIONS"; case MessageMethod::NONE: default: return "NONE"; @@ -119,6 +122,8 @@ namespace atomizes return MessageMethod::TRACE; if (method == "PATCH") return MessageMethod::PATCH; + if (method == "OPTIONS") + return MessageMethod::OPTIONS; return MessageMethod::NONE; }