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

helper method to create HTTP response with code #64

Merged
merged 3 commits into from
Dec 6, 2023
Merged

helper method to create HTTP response with code #64

merged 3 commits into from
Dec 6, 2023

Conversation

tanmaykm
Copy link
Member

@tanmaykm tanmaykm commented Dec 5, 2023

Added a helper method to create HTTP.Response with a HTTP code and a APIModel instance.

HTTP.Response(code::Integer, o::APIModel)

Added a helper method to create `HTTP.Response` with a HTTP code and a `APIModel` instance.

```julia
HTTP.Response(code::Integer, o::APIModel)
```
@tanmaykm tanmaykm requested a review from mortenpi December 5, 2023 13:52
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9b6bf34) 81.68% compared to head (2003e05) 81.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   81.68%   81.74%   +0.05%     
==========================================
  Files           7        7              
  Lines         617      619       +2     
==========================================
+ Hits          504      506       +2     
  Misses        113      113              

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

Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

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

This LGTM! Should maybe be mentioned somewhere in the docs though, that this is the preferred way to construct the responses.

@tanmaykm
Copy link
Member Author

tanmaykm commented Dec 6, 2023

👍 added to docs.
Also updated patch version for tagging.

@tanmaykm tanmaykm merged commit 85d0dd1 into main Dec 6, 2023
3 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.

3 participants