From 78814bf806985afe7251309ce52df3faed73fb34 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 6 May 2023 23:09:49 +0400 Subject: [PATCH] Added PATCH HTTP method. --- internal/http/server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/http/server.go b/internal/http/server.go index 3212dce..5099ba0 100644 --- a/internal/http/server.go +++ b/internal/http/server.go @@ -36,6 +36,10 @@ func (s *HttpServer) POST(path string, handler http.HandlerFunc) { s.router.Handler(http.MethodPost, path, handler) } +func (s *HttpServer) PATCH(path string, handler http.HandlerFunc) { + s.router.Handler(http.MethodPatch, path, handler) +} + func (s *HttpServer) DELETE(path string, handler http.HandlerFunc) { s.router.Handler(http.MethodDelete, path, handler) }