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(event): event.request getter to access web request #454

Merged
merged 10 commits into from
Jul 24, 2023
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jul 24, 2023

πŸ”— Linked issue

#73

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR adds support for the lazy initialized event.request property that resolves to a standard Web Request.

Note: It is still highly recommended to prefer using top level event API (event.{path,method,headers}) as it has lower foot print and can be optimized per runtime platform.

Known issues: Node.js 16 does not supports ReadableStream as body for Request constructor

Thanks for the initiative ideas from @Hebilicious in #421

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 changed the title feat: event.request to return a web request feat(event): event.request getter to access web request Jul 24, 2023
@pi0 pi0 mentioned this pull request Jul 24, 2023
8 tasks
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #454 (9cf1a8d) into main (591836e) will increase coverage by 0.29%.
The diff coverage is 94.23%.

@@            Coverage Diff             @@
##             main     #454      +/-   ##
==========================================
+ Coverage   77.93%   78.23%   +0.29%     
==========================================
  Files          26       26              
  Lines        2724     2775      +51     
  Branches      398      407       +9     
==========================================
+ Hits         2123     2171      +48     
- Misses        601      604       +3     
Impacted Files Coverage Ξ”
src/event/event.ts 74.40% <94.23%> (+6.28%) ⬆️

@pi0 pi0 marked this pull request as ready for review July 24, 2023 18:10
@pi0 pi0 merged commit 5c4521f into main Jul 24, 2023
@pi0 pi0 deleted the feat/event-request branch July 24, 2023 18:11
@pi0 pi0 mentioned this pull request Aug 4, 2023
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.

1 participant