Skip to content

Commit

Permalink
feat: support http delete method
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlJi committed Mar 18, 2024
1 parent edb0145 commit 9e0bcb6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ func (p *App) Patch(path string, handle func(ctx *Context)) {
p.Route(http.MethodPatch, path, handle)
}

// Delete is a shortcut for router.Route(http.MethodDelete, path, handle)
func (p *App) Delete(path string, handle func(ctx *Context)) {
p.Route(http.MethodDelete, path, handle)
}

// Static serves static files from a dir (default is "$YapFS/static").
func (p *App) Static__0(pattern string, dir ...fs.FS) {
p.Static(pattern, dir...)
Expand Down

0 comments on commit 9e0bcb6

Please sign in to comment.