mirror of
https://github.com/denoland/deno
synced 2024-08-28 12:29:31 +00:00
![Marcos Casagrande](/assets/img/avatar_default.png)
This commit adds a fast path to `Request` and `Response` that make consuming request bodies much faster when using `Body#text`, `Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream. Because the response bodies for `fetch` are FastStream, this speeds up consuming `fetch` response bodies significantly.
5 lines
158 B
Lua
5 lines
158 B
Lua
wrk.method = "POST"
|
|
wrk.headers["Content-Type"] = "application/octet-stream"
|
|
|
|
file = io.open("./cli/bench/testdata/128k.bin", "rb")
|
|
wrk.body = file:read("*a") |