on 0802221 help sign in
18 lines 578 B history raw
1{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Servant.API.Raw where
5import Data.Proxy
6import Network.Wai
7import Servant.Server
9-- | Endpoint for plugging in your own Wai 'Application's.
10--
11-- The given 'Application' will get the request as received by the server, potentially with
12-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
13data Raw
15instance HasServer Raw where
16 type Server Raw = Application
17 route Proxy rawApplication request respond =
18 rawApplication request (respond . succeedWith)