mirror of
https://github.com/labstack/echo.git
synced 2025-07-03 00:56:59 +02:00
Replace http constants with stdlib ones, i.e.: http.MethodGet instead of echo.GET (#1205)
This commit is contained in:
2
bind.go
2
bind.go
@ -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 || req.Method == DELETE {
|
||||
if req.Method == http.MethodGet || req.Method == http.MethodDelete {
|
||||
if err = b.bindData(i, c.QueryParams(), "query"); err != nil {
|
||||
return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user