Skip to content

Commit d92aca2

Browse files
authored
DELETE may also has json (#33)
DELETE may also has json
1 parent fc5a84d commit d92aca2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

binding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535

3636
func bind(ctx *macaron.Context, obj interface{}, ifacePtr ...interface{}) {
3737
contentType := ctx.Req.Header.Get("Content-Type")
38-
if ctx.Req.Method == "POST" || ctx.Req.Method == "PUT" || ctx.Req.Method == "PATCH" {
38+
if ctx.Req.Method == "POST" || ctx.Req.Method == "PUT" || ctx.Req.Method == "PATCH" || ctx.Req.Method == "DELETE" {
3939
switch {
4040
case strings.Contains(contentType, "form-urlencoded"):
4141
ctx.Invoke(Form(obj, ifacePtr...))

0 commit comments

Comments
 (0)