From a000d1edadc0f200bedd9df3e4b3d44138e7e63b Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 21 Oct 2022 03:21:53 +0400 Subject: [PATCH] Added PUT method to HttpServer. --- pkg/server/http.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/server/http.go b/pkg/server/http.go index 2153352..40e2422 100644 --- a/pkg/server/http.go +++ b/pkg/server/http.go @@ -40,6 +40,10 @@ func (s *HttpServer) PATCH(path string, handler http.HandlerFunc) { s.router.Handler(http.MethodPatch, path, handler) } +func (s *HttpServer) PUT(path string, handler http.HandlerFunc) { + s.router.Handler(http.MethodPut, path, handler) +} + func (s *HttpServer) DELETE(path string, handler http.HandlerFunc) { s.router.Handler(http.MethodDelete, path, handler) }