Skip to content

Proposal: Allow user to bind query parameters to structs directly #1214

Closed
@QuantumGhost

Description

@QuantumGhost

Issue Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions