Skip to content

Binding of query parameters should also work for HEAD methods #2026

Closed

Description

@clems71

Based on the fact that HEAD method is a GET-like with no content, I think that binding of query parameters should be allowed for HEAD methods as well here:

echo/bind.go

Line 118 in 8b4cce5

if c.Request().Method == http.MethodGet || c.Request().Method == http.MethodDelete {

Thoughts?

Activity

  1. clems71 commented on Nov 16, 2021

    @clems71
    ContributorAuthor

    Temporary workaround for people who might need that:

    // ...
    // Works even for HEAD method
    var binder echo.DefaultBinder
    err := binder.BindQueryParams(c, queryObj)
    // ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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