Skip to content

Commit

Permalink
Merge pull request #111 from CarlJi/feat/http-delete
Browse files Browse the repository at this point in the history
feat: support http delete method
  • Loading branch information
xushiwei authored Mar 19, 2024
2 parents edb0145 + 9e0bcb6 commit 6949ea5
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 6949ea5

Please sign in to comment.