Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for HEAD method query params binding. #2027

Merged
merged 2 commits into from Jan 24, 2022

Conversation

clems71
Copy link
Contributor

@clems71 clems71 commented Nov 16, 2021

Adding support for HEAD method query params binding.

Fixes #2026

Adding support for HEAD method query params binding.
@clems71 clems71 changed the title Update bind.go Adding support for HEAD method query params binding. Nov 16, 2021
@lammel
Copy link
Contributor

lammel commented Nov 20, 2021

As HEAD requests are used to retrieve headers for GET request, param binding should work the same way as with GET.
The comment for this section should be improved though.

@aldas Any objections?

bind.go Outdated Show resolved Hide resolved
@aldas
Copy link
Contributor

aldas commented Nov 21, 2021

@lammel seems fine by me. I have no objections.

@codecov
Copy link

codecov bot commented Nov 21, 2021

Codecov Report

Merging #2027 (3a893a8) into master (4b88e25) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2027   +/-   ##
=======================================
  Coverage   91.23%   91.23%           
=======================================
  Files          33       33           
  Lines        2887     2888    +1     
=======================================
+ Hits         2634     2635    +1     
  Misses        161      161           
  Partials       92       92           
Impacted Files Coverage Δ
middleware/rate_limiter.go 100.00% <ø> (ø)
bind.go 89.47% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b4cce5...3a893a8. Read the comment docs.

Copy link
Contributor

@lammel lammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clems71 I've updated the code comment for Bind.
Could you please add a test for HEAD to behave identical to GET, just to ensure this behavior is tested with future releases.

We will merge the branch then.

@lammel lammel merged commit eb371a9 into labstack:master Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Binding of query parameters should also work for HEAD methods
3 participants