gpt4 book ai didi

Node.JS:当客户端请求中断时,postdata 会发生什么?

转载 作者:可可西里 更新时间:2023-11-01 17:11:00 26 4
gpt4 key购买 nike

the Node.JS docs for HTTP (v0.8.20),在 ServerRequest 下,我看到了 dataend 的事件。我没有看到 error 的事件。

通常,如果在接收数据时出现中断,我可以通过查看error 来检测它。但这对 postdata 有用吗?

我如何确定是否收到了完整的 postdata,并且没有因为网络故障而被截断?

最佳答案

我还没有用实际运行的代码证实这一点,只是看手册,http.ServerRequestReadable Stream并且记录了事件:“错误”

关于Node.JS:当客户端请求中断时,postdata 会发生什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14940282/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com