listhen icon indicating copy to clipboard operation
listhen copied to clipboard

feat: http2 support

Open Mastercuber opened this issue 11 months ago โ€ข 14 comments

๐Ÿ”— Linked issue

Closes #10

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • [ ] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [x] ๐Ÿ‘Œ 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

Here is a node.js native http2 support using the http2 module.

RequestListener's are now self defined since it seems, there is no type/interface including both http and http2 request and response.

Since the NodeListener interface from unjs/h3 is for HTTP1.x only, it is defined in dev.ts. Maybe the NodeListener type should be moved to h3.

The secureServer is started with http1 enabled, so it's possible to connect to the server with http1.x and http2. This is shown by the added test.

It isn't possible to connect to a non encrypted HTTP2 server (see HTTP2 FAQ). This is also shown by a test.

Also a server type is created.

๐Ÿ“ Checklist

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

Mastercuber avatar Aug 14 '23 19:08 Mastercuber