1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-31 22:05:06 +02:00

Bind DELETE params too

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2017-03-31 21:39:18 -07:00
parent 22012e0e9d
commit a216a9319a

@ -31,7 +31,7 @@ type (
func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
req := c.Request()
if req.ContentLength == 0 {
if req.Method == GET {
if req.Method == GET || req.Method == DELETE {
if err = b.bindData(i, c.QueryParams(), "query"); err != nil {
return NewHTTPError(http.StatusBadRequest, err.Error())
}