Closed GnApollo closed 6 months ago
The Request.json() method is an optimized version of the uWebsockets.js implementation.
You can also consume the raw data using Request.on() since Request is a ReadableStream.
thanks for the reply. actually with headers Transfer-Encoding : chunked, the Request.json(), Request.text(), Request.buffer() , Request.raw() returns null .
i end up using new Server().uws_instance.post() and then read the json data their.
Ohhh I see what you are talking about now. Yeah, currently hyper-express
looks for a content-length
to pre-allocate a body Buffer for performance reasons. I didn't know Transfer-Encoding chunked is supported now by uWS, should certainly be a feature worth adding to support in future.
Hey, support for chunked transfer requests has been added in the recent v6.15.2
versison.
Is there a way to read JSON from post request with headers Transfer-Encoding : chunked?
Like from uwebsockets.js