You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently echo.DefaultBinder#Bind bind parameters to structs based on request method and content length. More specifically, it only retrieves data from Context#QueryParams when req.ContentLength == 0 and req.Method is GET or DELETE. So it's impossible for user to bind query parameters to structs when request method is neither GET nor DELETE.
I hope that echo.DefaultBinder could add a method BindQuery, which binds query parameters to structs directly.
A even better (but incompatible) change is to add BindQuery method to the echo.Binder inferface, and implement this method in echo.DefaultBinder.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue Description
Currently
echo.DefaultBinder#Bind
bind parameters to structs based on request method and content length. More specifically, it only retrieves data fromContext#QueryParams
whenreq.ContentLength == 0
andreq.Method
isGET
orDELETE
. So it's impossible for user to bind query parameters to structs when request method is neitherGET
norDELETE
.I hope that
echo.DefaultBinder
could add a methodBindQuery
, which binds query parameters to structs directly.A even better (but incompatible) change is to add
BindQuery
method to theecho.Binder
inferface, and implement this method inecho.DefaultBinder
.The text was updated successfully, but these errors were encountered: