@@ -1,7 +1,4 @@
11-- | Timeout requests
2−--
3−-- @since X.X.X@
4−--
52module Network.Wai.Middleware.Timeout
63 ( timeout
74 , timeoutStatus
@@ -17,14 +14,19 @@ import qualified System.Timeout as Timeout
1714-- Timeouts respond with @'status503'@. See @'timeoutStatus'@ or @'timeoutAs'@
1815-- to customize the behavior of the timed-out case.
1916--
17+-- @since 3.0.24.0@
2018timeout :: Int -> Middleware
2119timeout = timeoutStatus status503
2220
2321-- | Time out with the given @'Status'@
22+--
23+-- @since 3.0.24.0@
2424timeoutStatus :: Status -> Int -> Middleware
2525timeoutStatus status = timeoutAs $ responseLBS status [] ""
2626
2727-- | Time out with the given @'Response'@
28+--
29+-- @since 3.0.24.0@
2830timeoutAs :: Response -> Int -> Middleware
2931timeoutAs timeoutReponse seconds app req respond =
3032 maybe (respond timeoutReponse) pure