'checkContinue' 事件
request
<http.IncomingMessage>response
<http.ServerResponse>
每次收到带有 HTTP Expect: 100-continue
的请求时触发。
如果未监听此事件,则服务器将根据需要自动响应 100 Continue
。
如果客户端应该继续发送请求正文,则处理此事件涉及调用 response.writeContinue()
,或者如果客户端不应该继续发送请求正文,则生成适当的 HTTP 响应(例如 400 Bad Request)。
处理和处理此事件时,不会触发 'request'
事件。
request
<http.IncomingMessage>response
<http.ServerResponse>
Emitted each time a request with an HTTP Expect: 100-continue
is received.
If this event is not listened for, the server will automatically respond
with a 100 Continue
as appropriate.
Handling this event involves calling response.writeContinue()
if the
client should continue to send the request body, or generating an appropriate
HTTP response (e.g. 400 Bad Request) if the client should not continue to send
the request body.
When this event is emitted and handled, the 'request'
event will
not be emitted.