mirror of
https://github.com/labstack/echo.git
synced 2025-04-23 12:18:53 +02:00
Bind DELETE params too
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
22012e0e9d
commit
a216a9319a
2
bind.go
2
bind.go
@ -31,7 +31,7 @@ type (
|
|||||||
func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
|
func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
|
||||||
req := c.Request()
|
req := c.Request()
|
||||||
if req.ContentLength == 0 {
|
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 {
|
if err = b.bindData(i, c.QueryParams(), "query"); err != nil {
|
||||||
return NewHTTPError(http.StatusBadRequest, err.Error())
|
return NewHTTPError(http.StatusBadRequest, err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user