How to read Chunked request body?

Hello! Is it possible to read a chunked request body using for await? It seems to only read up to the point where the reader is empty and then stop. Since some chunks might only show up after some delay, I need it to read until 'zero-length chunk' is sent, meaning the chunked body is over.
3 Replies
mmastrac
mmastrac13mo ago
Are you using Deno.serve or Deno.serveHttp?
Guilherme C. Souza
Deno.serveHttp
mmastrac
mmastrac13mo ago
This definitely should work, though I checked through our tests and was not able to see a test directly asserting that this functionality is working. Note that we're currently in the process of replacing the implementation of Deno.serveHttp to be a wrapper over the new Deno.serve API. Would you be able to try this with Deno.serve instead and/or put together a small reproduction case for us to look at?