akka/akka-http

Add onRequestTimeout Directive

Aperta

#2015 aperta il 15 mag 2018

 (3 commenti) (0 reazioni) (0 assegnatari)Scala (598 fork)batch import
1 - triagedhelp wantedt:routing

Metriche repository

Star
 (1311 stelle)
Metriche merge PR
 (Merge medio 1g 10h) (2 PR mergiate in 30 g)

Descrizione

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.

Guida contributor