Added DELETE method handler setter for HTTP server.
This commit is contained in:
parent
69ffa45f2d
commit
351f5dda4b
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user