1
0

Added DELETE method handler setter for HTTP server.

This commit is contained in:
Alexander Andreev 2022-07-01 03:26:15 +04:00
parent 69ffa45f2d
commit 351f5dda4b
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -36,6 +36,10 @@ func (s *HttpServer) POST(path string, handler http.HandlerFunc) {
s.router.Handler(http.MethodPost, path, handler) s.router.Handler(http.MethodPost, path, handler)
} }
func (s *HttpServer) DELETE(path string, handler http.HandlerFunc) {
s.router.Handler(http.MethodDelete, path, handler)
}
func (s *HttpServer) ServeStatic(path string, fsys http.FileSystem) { func (s *HttpServer) ServeStatic(path string, fsys http.FileSystem) {
s.router.ServeFiles(path, fsys) s.router.ServeFiles(path, fsys)
} }