on c08ca32 help sign in
17 lines 539 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-- The given Application will get the original request received by the server
11-- (i.e. with unmodified 'pathInfo', etc.)
12data Raw
14instance HasServer Raw where
15 type Server Raw = Application
16 route Proxy rawApplication globalPathInfo request respond =
17 rawApplication request{pathInfo = globalPathInfo} (respond . Just)