akka/akka-http

Add onRequestTimeout Directive

オープン

#2,015 opened on 2018/05/15

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Scala (598 件のフォーク)batch import
1 - triagedhelp wantedt:routing

Repository metrics

Stars
 (1,311 個のスター)
PR merge metrics
 (平均マージ 1d 10h) (30d で 2 merged PRs)

説明

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.

コントリビューターガイド