这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: adding the head method to the list of convenience wrappers #760

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

Merged
merged 1 commit into from
Mar 15, 2025

Conversation

hiddenmarten
Copy link
Contributor

Hi,

Thank you again for your work on this project!

I just noticed that the head method is missing here. Hopefully, this small addition will be helpful to others. :)

@hiddenmarten hiddenmarten changed the title feat: add head method in the list of convenience wrappers feat: adding the head method in the list of convenience wrappers Mar 13, 2025
@hiddenmarten hiddenmarten changed the title feat: adding the head method in the list of convenience wrappers feat: adding the head method to the list of convenience wrappers Mar 13, 2025
Copy link
Owner

@danielgtaylor danielgtaylor left a comment

Choose a reason for hiding this comment

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

Thanks! 👍

@danielgtaylor danielgtaylor requested a review from Copilot March 15, 2025 18:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds a new convenience wrapper for HTTP HEAD operations to the API.

  • Added the Head function in huma.go with corresponding documentation comments.
  • Updated a commented example in the convenience function to better reflect the intended output type.
  • Added tests in huma_test.go to validate the new Head method behavior.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
huma.go Added Head HTTP method wrapper and updated an example comment.
huma_test.go Added tests to assert correct behavior of the new Head method.

Copy link

codecov bot commented Mar 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.05%. Comparing base (6f2a42b) to head (12e60ee).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #760      +/-   ##
==========================================
+ Coverage   93.00%   93.05%   +0.04%     
==========================================
  Files          23       23              
  Lines        5250     5252       +2     
==========================================
+ Hits         4883     4887       +4     
+ Misses        315      313       -2     
  Partials       52       52              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielgtaylor danielgtaylor merged commit b73e5ef into danielgtaylor:main Mar 15, 2025
5 checks passed
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.

2 participants