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
It is common for POST/UPDATE requests to have the resource identified sent on the URL while the content is sent on the body. It'd be useful to have the DefaultBinder to bind route parameters into the Model. Example below.
Checklist
Dependencies installed
No typos
Searched existing issues and docs
Expected behaviour
type newCommentInput struct {
Number int `param:"number"`
Content string `json:"content"`
}
input := new(newCommentInput)
c.Bind(input);
This would bind both Number and Content.
Actual behaviour
It is necessary to use both c.Bind and c.Param('number') to fill this model.
Issue Description
It is common for POST/UPDATE requests to have the resource identified sent on the URL while the content is sent on the body. It'd be useful to have the DefaultBinder to bind route parameters into the Model. Example below.
Checklist
Expected behaviour
This would bind both Number and Content.
Actual behaviour
It is necessary to use both
c.Bind
andc.Param('number')
to fill this model.Steps to reproduce
n/a
Working code to debug
An example of how I'm currently doing it https://github.com/getfider/fider/blob/557d3c515b8b5ac55ae1c0f7161d2d11b448fef7/app/handlers/idea.go#L131-L152
Just as information, this is common in other frameworks. Following example from C#.
Version/commit
v3.2.1
Thanks for creating Echo :)
If approved, I could give it a try and work on it.
The text was updated successfully, but these errors were encountered: