akka/akka-http

Add onRequestTimeout Directive

开放

#2,015 创建于 2018年5月15日

 (3 条评论) (0 个反应) (0 位负责人)Scala (598 个派生)batch import
1 - triagedhelp wantedt:routing

仓库指标

星标
 (1,311 个星标)
PR 合并指标
 (平均合并 1天 10小时) (30 天内合并 2 个 PR)

描述

It would be nice if we had a directive that allowed us to side-effect when a server request timeout occurs. Currently we can do something on withRequestTimeoutResponse, but that requires us to supply a response rather than let the timeout handling happen elsewhere. An example of when this is desirable would be when an external request results in client requests or other streams being run that need to be consumed to supply a response to the request. In this case it's desirable to consume/killswitch those streams when the request times out.

贡献者指南