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: getRequestHost, getRequestProtocol and getRequestURL utils #351

Merged
merged 4 commits into from
Mar 10, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Mar 6, 2023

Resolves #347

Resolves #306

Implementing requrl and is-https as h3 built-in utils.

I had been initially thinking to expose it as event.url it has some DX improvements but also downside of not being able to tree-shake and also not reflecting req.path changes.

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #351 (1617eb0) into main (c84c811) will decrease coverage by 0.42%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##             main     #351      +/-   ##
==========================================
- Coverage   74.61%   74.20%   -0.42%     
==========================================
  Files          25       25              
  Lines        2336     2357      +21     
  Branches      368      368              
==========================================
+ Hits         1743     1749       +6     
- Misses        593      608      +15     
Impacted Files Coverage Δ
src/utils/request.ts 85.04% <28.57%> (-13.80%) ⬇️

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

@pi0 pi0 marked this pull request as ready for review March 7, 2023 11:37
@pi0 pi0 merged commit ff71eba into main Mar 10, 2023
@pi0 pi0 deleted the feat/req-url branch March 10, 2023 16:54
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.

event.url feat: add an utility function to get protocol
1 participant