1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/ext/http
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
..
benches perf(ext/http): faster is_content_compressible (#14383) 2022-04-24 21:45:56 +02:00
01_http.js feat(ext/flash): split upgradeHttp into two APIs (#15557) 2022-08-24 17:40:57 +05:30
Cargo.toml chore: forward v1.24.3 release commit to main (#15462) 2022-08-11 16:47:03 -04:00
compressible.rs perf(ext/http): faster is_content_compressible (#14383) 2022-04-24 21:45:56 +02:00
lib.rs feat(ext/flash): An optimized http/1.1 server (#15405) 2022-08-18 17:35:02 +05:30
README.md chore: add README to ext/http/ (#11958) 2021-09-08 20:48:28 +02:00

deno_http

This crate implements server-side HTTP based on primitives from the Fetch API.