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

feat: addsendNoContent utility to create a 204 response #250

Merged
merged 5 commits into from
Dec 15, 2022

Conversation

tobiasdiez
Copy link
Contributor

Adds a little helper method to immediately end the response without sending any data.

Note sure about the naming, but otherwise ready to be review.

@codecov
Copy link

codecov bot commented Nov 26, 2022

Codecov Report

Merging #250 (b0de4bf) into main (4e52381) will decrease coverage by 0.19%.
The diff coverage is 56.25%.

❗ Current head b0de4bf differs from pull request most recent head b697c77. Consider uploading reports for the commit b697c77 to get more accurate results

@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
- Coverage   75.84%   75.64%   -0.20%     
==========================================
  Files          21       20       -1     
  Lines        1681     1232     -449     
  Branches      273      224      -49     
==========================================
- Hits         1275      932     -343     
+ Misses        406      300     -106     
Impacted Files Coverage Δ
src/utils/response.ts 61.11% <56.25%> (+4.63%) ⬆️
src/utils/cache.ts 30.61% <0.00%> (-4.01%) ⬇️
src/app.ts 93.05% <0.00%> (-1.17%) ⬇️
src/utils/request.ts 98.55% <0.00%> (-0.29%) ⬇️
src/types.ts 100.00% <0.00%> (ø)
src/utils/multipart.ts
src/utils/proxy.ts 86.02% <0.00%> (+0.04%) ⬆️
src/utils/body.ts 83.78% <0.00%> (+0.31%) ⬆️
src/node.ts 85.18% <0.00%> (+0.36%) ⬆️
src/router.ts 94.73% <0.00%> (+0.47%) ⬆️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks!

@pi0 pi0 changed the title feat: add sendEmpty helper method to create a response with an empty payload feat: addsendNoContent utility to create a response with an empty payload Dec 15, 2022
@pi0 pi0 changed the title feat: addsendNoContent utility to create a response with an empty payload feat: addsendNoContent utility to create a 204 response with an empty payload Dec 15, 2022
@pi0 pi0 changed the title feat: addsendNoContent utility to create a 204 response with an empty payload feat: addsendNoContent utility to create a 204 response Dec 15, 2022
@pi0 pi0 merged commit 0979cac into unjs:main Dec 15, 2022
@tobiasdiez tobiasdiez deleted the send-empty-res branch December 15, 2022 17:04
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.

None yet

3 participants