难道nodejs的http模块不能一次接收/发送整个请求/响应吗?

Isn't the http module of nodejs capable of receiving / sending the whole request / response at once?

我正在学习 nodejshttp 模块。我在 documentation 中找到了一个部分:

The interface is careful to never buffer entire requests or responses

这是否意味着该模块无法一次接收/发送整个请求/响应,而是分块接收/发送?

Does it means that this module is not capable of receiving / sending the whole request / response at once and it receives / sends in chunks instead?

正确:http 是基于流的,就像底层 net 模块一样。

有很多模块可用于为您抽象这些流,并提供接收完整的响应(在内存中,所以要小心大响应)。例如,request and http.min.