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.

貢獻者指南