Skip to content

Commit

Permalink
DELETE may also has json (#33)
Browse files Browse the repository at this point in the history
DELETE may also has json
  • Loading branch information
xmh19936688 authored Feb 24, 2020
1 parent fc5a84d commit d92aca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

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

0 comments on commit d92aca2

Please sign in to comment.