pixiu
pixiu copied to clipboard
Optimized the HTTP bind util with streaming style
What type of PR is this?
/kind optimization
What this PR does / why we need it:
Optimized the HTTP bind util with a streaming style. For example:
var (
idMeta IdMeta
req types.UpdateClusterRequest
listOpts types.ListOptions
)
if err := httputils.ShouldBind(c).WithUri(&idMeta).WithBody(&req).WithQuery(&listOpts).Error(); err != nil {
// error handle
}
It's optional and flexible, maybe a little bit graceful.
Does this PR introduce a user-facing change?
NONE