0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00
deno/ext/flash
Luca Casonato f3bde1d53b
feat(ext/flash): split upgradeHttp into two APIs (#15557)
This commit splits `Deno.upgradeHttp` into two different APIs, because
the same API is currently overloaded with two different functions. Flash
requests upgrade immediately, with no need to return a `Response`
object. Instead you have to manually write the response to the socket.
Hyper requests only upgrade once a `Response` object has been sent.

These two behaviours are now split into `Deno.upgradeHttp` and
`Deno.upgradeHttpRaw`. The latter is flash only. The former only
supports hyper requests at the moment, but can be updated to support
flash in the future.

Additionally this removes `void | Promise<void>` as valid return types
for the handler function. If one wants to use `Deno.upgradeHttpRaw`,
they will have to type cast the handler signature - the signature is
meant for the 99.99%, and should not be complicated for the 0.01% that
use `Deno.upgradeHttpRaw()`.
2022-08-24 17:40:57 +05:30
..
01_http.js feat(ext/flash): split upgradeHttp into two APIs (#15557) 2022-08-24 17:40:57 +05:30
Cargo.toml feat(ext/flash): An optimized http/1.1 server (#15405) 2022-08-18 17:35:02 +05:30
chunked.rs feat(ext/flash): An optimized http/1.1 server (#15405) 2022-08-18 17:35:02 +05:30
lib.rs fix(unstable): better error for invalid hostname in Deno.serve() (#15529) 2022-08-21 21:15:52 +02:00
README.md feat(unstable): change Deno.serve() API (#15498) 2022-08-19 14:36:01 +02:00
request.rs fix(ext/flash): concurrent response streams (#15493) 2022-08-19 10:14:56 +05:30
sendfile.rs Fix: Honor linter rules in CI and locally (#15492) 2022-08-19 08:17:18 -04:00

flash

Flash is a fast HTTP/1.1 server implementation for Deno.

serve({ fetch: (req) => new Response("Hello World") });