wai-extra-3.1.14: Provides some basic WAI handlers and middleware.

Safe Haskell | None
Language | Haskell2010

Network.Wai.Middleware.Timeout

Description

Timeout requests

Synopsis

- timeout :: Int -> Middleware
- timeoutStatus :: Status -> Int -> Middleware
- timeoutAs :: Response -> Int -> Middleware

# Documentation

timeout :: Int -> Middleware #

Time out the request after the given number of seconds

Timeouts respond with ``status503``. See ``timeoutStatus`` or ``timeoutAs`` to customize the behavior of the timed-out case.

    since 3.0.24.0

timeoutStatus :: Status -> Int -> Middleware #

Time out with the given ``Status``

    since 3.0.24.0

timeoutAs :: Response -> Int -> Middleware #

Time out with the given ``Response``

    since 3.0.24.0