From a00b1eef7c2485d64f4d8be6dd701ee491c2ec44 Mon Sep 17 00:00:00 2001 From: John Wang Date: Mon, 11 Dec 2023 02:08:02 -0800 Subject: [PATCH] feat: `net/http/httputilmore`: add `Methods()` --- net/http/httputilmore/http_method.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/net/http/httputilmore/http_method.go b/net/http/httputilmore/http_method.go index 422de0b6..9add7554 100644 --- a/net/http/httputilmore/http_method.go +++ b/net/http/httputilmore/http_method.go @@ -65,3 +65,16 @@ func MethodsMap() map[string]int { http.MethodTrace: 1, } } + +func Methods() []string { + return []string{ + http.MethodConnect, + http.MethodDelete, + http.MethodGet, + http.MethodHead, + http.MethodOptions, + http.MethodPatch, + http.MethodPost, + http.MethodPut, + http.MethodTrace} +}