-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell Webapps on AWS Lambda -- -- -- Turn any wai webapp ( spock, servant, etc) into a -- handler for AWS Lambda and API Gateway requests. -- -- Works with any Lambda environment (nodejs, python, etc). Find out more -- in the README. @package wai-lambda @version 0.1.1.0 module Network.Wai.Handler.Lambda -- | The representation of the response sent back to API Gateway. type RawResponse = (Status, ResponseHeaders, ByteString) -- | The settings for running an Application. -- -- See also: * runSettings -- -- For simplicity use the following setters with defaultSettings: -- * setTimeoutSeconds * setHandleTimeout * -- setHandleException data Settings Settings :: Int -> (ByteString -> IO RawResponse) -> (ByteString -> SomeException -> IO RawResponse) -> Settings -- | How many microseconds before we declare a timeout [timeoutValue] :: Settings -> Int -- | How to handle a timeout [handleTimeout] :: Settings -> ByteString -> IO RawResponse -- | How to handle an exception thrown by the Application [handleException] :: Settings -> ByteString -> SomeException -> IO RawResponse -- | Run an Application. -- -- Continuously reads requests from stdin. Each line should be a -- a JSON document as described in decodeInput. -- -- All requests will be timed out after 2 seconds. If any exception is -- thrown while processing the request this will return an HTTP 500 -- Internal Server Error. -- -- If you need more control use handleRequest directly. run :: Application -> IO () runSettings :: Settings -> Application -> IO () setTimeoutSeconds :: Int -> Settings -> Settings setHandleException :: (ByteString -> SomeException -> IO RawResponse) -> Settings -> Settings setHandleTimeout :: (ByteString -> IO RawResponse) -> Settings -> Settings defaultSettings :: Settings defaultHandleException :: ByteString -> SomeException -> IO RawResponse -- | Default request timeout. 2 seconds. defaultTimeoutValue :: Int defaultHandleTimeout :: ByteString -> IO RawResponse -- | Parse and handle the request. -- --
-- flip fix --xif :: b -> ((b -> c) -> b -> c) -> c uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d instance Control.DeepSeq.NFData Network.Wai.Handler.Lambda.Http instance Data.Aeson.Types.FromJSON.FromJSON Network.Wai.Handler.Lambda.Http instance Data.Aeson.Types.ToJSON.ToJSON Network.Wai.Handler.Lambda.Http instance GHC.Generics.Generic Network.Wai.Handler.Lambda.Http instance GHC.Show.Show Network.Wai.Handler.Lambda.Http instance Control.DeepSeq.NFData Network.Wai.Handler.Lambda.RequestContext instance Data.Aeson.Types.FromJSON.FromJSON Network.Wai.Handler.Lambda.RequestContext instance Data.Aeson.Types.ToJSON.ToJSON Network.Wai.Handler.Lambda.RequestContext instance GHC.Generics.Generic Network.Wai.Handler.Lambda.RequestContext instance GHC.Show.Show Network.Wai.Handler.Lambda.RequestContext instance Control.DeepSeq.NFData Network.Wai.Handler.Lambda.ApiGatewayRequestV2 instance Data.Aeson.Types.FromJSON.FromJSON Network.Wai.Handler.Lambda.ApiGatewayRequestV2 instance Data.Aeson.Types.ToJSON.ToJSON Network.Wai.Handler.Lambda.ApiGatewayRequestV2 instance GHC.Generics.Generic Network.Wai.Handler.Lambda.ApiGatewayRequestV2 instance GHC.Show.Show Network.Wai.Handler.Lambda.ApiGatewayRequestV2 module Lambda -- | Run an Application. -- -- Continuously reads requests from stdin. Each line should be a -- a JSON document as described in decodeInput. -- -- All requests will be timed out after 2 seconds. If any exception is -- thrown while processing the request this will return an HTTP 500 -- Internal Server Error. -- -- If you need more control use handleRequest directly. run :: Application -> IO () -- | Parse and handle the request. -- --