1
0

Added DELETE method to server.

This commit is contained in:
Alexander Andreev 2023-02-06 01:59:33 +04:00
parent 87ba488769
commit 3c47d42ba7
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)
} }